Skip to content

Commit c833cb6

Browse files
committed
perf[Chore]: optimization.splitChunks adapt cnpm module name
1 parent afb62ed commit c833cb6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
2626
app.listen(port, function () {
2727
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
2828
if (report) {
29-
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}/report.html`))
29+
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
3030
}
3131

3232
})

vue.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ module.exports = {
114114
elementUI: {
115115
name: 'chunk-elementUI', // split elementUI into a single package
116116
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
117-
test: /[\\/]node_modules[\\/]element-ui[\\/]/
117+
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
118118
},
119119
commons: {
120120
name: 'chunk-commons',

0 commit comments

Comments
 (0)