-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
37 lines (37 loc) · 1.04 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// 基础路径 注意发布之前要先修改这里
let baseUrl = './'
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
module.exports = {
publicPath: baseUrl, // 根据你的实际情况更改这里
lintOnSave: true,
productionSourceMap: false,
// configureWebpack: config => {
// if (process.env.NODE_ENV === 'production') {
// return {
// plugins: [
// new BundleAnalyzerPlugin()
// ]
// }
// }
// },
chainWebpack: (config) => {
//忽略的打包文件
config.externals({
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'element-ui': 'ELEMENT',
})
const entry = config.entry('app')
entry
.add('babel-polyfill')
.end()
entry
.add('classlist-polyfill')
.end()
entry
.add('@/mock')
.end()
}
}