- 实现头像加载失败处理机制,添加默认头像回退方案 - 使用 ref 状态追踪头像加载失败情况,避免 watchEffect 重置问题 - 更新位置服务地图链接,从腾讯地图切换到高德地图服务 - 配置 Vue 构建依赖转译,解决 element-plus 兼容性问题 - 移除多个无用的 SVG 图标文件,精简项目资源
31 lines
840 B
JavaScript
31 lines
840 B
JavaScript
const path = require('path');
|
|
|
|
function resolve(dir) {
|
|
return path.join(__dirname, dir);
|
|
}
|
|
module.exports = {
|
|
publicPath: './',
|
|
assetsDir: './',
|
|
outputDir: '../public/static/im-web',
|
|
productionSourceMap: false,
|
|
lintOnSave: false,
|
|
transpileDependencies: ['element-plus', 'vue-router', '@ctrl/tinycolor'],
|
|
chainWebpack: (config) => {
|
|
config.resolve.alias.set('@', resolve('src')).set('tim', resolve('src/tim.js'));
|
|
// 删除预加载
|
|
config.plugins.delete('preload');
|
|
config.plugins.delete('prefetch');
|
|
// 压缩代码
|
|
config.optimization.minimize(true);
|
|
// 分割代码
|
|
config.optimization.splitChunks({
|
|
chunks: 'all',
|
|
});
|
|
config.plugin('html').tap((params) => {
|
|
const args = params;
|
|
args[0].title = '腾讯云即时通信 Web-IM';
|
|
return args;
|
|
});
|
|
},
|
|
};
|