Skip to content

Commit 0ef4c59

Browse files
committed
chore: art
1 parent 51fc5ad commit 0ef4c59

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/service/chainConfig.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ const { tryRequire } = require('@micro-app/shared-utils');
55
module.exports = function chainDefault(api, vueConfig, options, webpackConfig) {
66
const webpackConfigAlias = webpackConfig.module.alias || {};
77

8-
if (options.publicPath) {
9-
vueConfig.publicPath = options.publicPath;
10-
}
11-
12-
if (options.outputDir) {
13-
vueConfig.outputDir = options.outputDir;
14-
}
15-
16-
if (options.assetsDir) {
17-
vueConfig.assetsDir = options.assetsDir;
18-
}
8+
[
9+
'publicPath',
10+
'outputDir',
11+
'assetsDir',
12+
]
13+
.forEach(key => {
14+
if (options[key] !== undefined) {
15+
vueConfig[key] = options[key];
16+
}
17+
});
1918

2019
// devServer
2120
vueConfig.devServer = Object.assign({}, vueConfig.devServer || {}, options.devServer || {});

0 commit comments

Comments
 (0)