We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c70a8c9 commit f55514aCopy full SHA for f55514a
examples/mpa/package.json
@@ -2,6 +2,7 @@
2
"name": "@example/mpa",
3
"private": true,
4
"scripts": {
5
+ "build": "umi build",
6
"dev": "umi dev",
7
"start": "npm run dev"
8
},
packages/preset-umi/src/features/webpack/webpack.ts
@@ -69,8 +69,10 @@ export default (api: IApi) => {
69
}
70
71
api.modifyWebpackConfig((config) => {
72
- // 处理 代码拆分时, 拆分的 非 入口文件, 自动注入到 html 文件中
73
- config.plugins?.push(new HtmlWebpackPlugin());
+ if (!api.config.mpa) {
+ // 处理 代码拆分时, 拆分的 非 入口文件, 自动注入到 html 文件中
74
+ config.plugins?.push(new HtmlWebpackPlugin());
75
+ }
76
return config;
77
});
78
0 commit comments