从新提交到gitee 仓库
This commit is contained in:
29
web/config/config.ts
Normal file
29
web/config/config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { defineConfig } from 'umi';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
|
||||
export default defineConfig({
|
||||
chainWebpack(config) {
|
||||
config.plugin('bundle-analyzer').use(BundleAnalyzerPlugin, [
|
||||
{
|
||||
analyzerMode: 'static', // 输出静态 HTML 文件
|
||||
reportFilename: 'bundle-report.html', // 报告文件名
|
||||
openAnalyzer: false, // 不自动打开浏览器
|
||||
},
|
||||
]);
|
||||
},
|
||||
|
||||
mfsu: {
|
||||
strategy: 'eager', // 优化模块共享机制
|
||||
},
|
||||
|
||||
extraBabelPlugins: [
|
||||
[
|
||||
'import',
|
||||
{
|
||||
libraryName: 'antd',
|
||||
libraryDirectory: 'es',
|
||||
style: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user