Skip to content

Commit 84be076

Browse files
committed
fix: add webpack pkg &change production config
1 parent 68ff81c commit 84be076

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"svg-sprite-loader": "5.0.0",
7575
"vue-cli-plugin-mockjs": "0.1.3",
7676
"vue-template-compiler": "2.6.12",
77+
"webpack": "4.46.0",
7778
"webpack-virtual-modules": "0.3.2"
7879
}
7980
}

web/vue.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ function resolve(dir) {
107107
module.exports = {
108108
publicPath: './',
109109
outputDir: 'dist/dist',
110+
lintOnSave: process.env.NODE_ENV !== "production", // build无需eslint
111+
productionSourceMap: process.env.NODE_ENV === "dev", // 生产环境无需source map加速构建
110112
chainWebpack: (config) => {
111113
// set svg-sprite-loader
112114
config.module
@@ -168,4 +170,4 @@ module.exports = {
168170
}
169171
}
170172
}
171-
}
173+
}

0 commit comments

Comments
 (0)