-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.config.js
71 lines (70 loc) · 1.78 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
const resolve = (...dirs) => require('path').resolve(__dirname, ...dirs)
// const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = {
publicPath: '/',
configureWebpack: {
entry: {
index: 'src/main.js',
},
resolve: {
alias: {
src: resolve('src'),
js: resolve('src/js'),
},
},
externals: {
'vue': 'Vue',
'echarts': 'echarts',
'ant-design-vue': 'antd',
'moment': 'moment',
},
plugins: [
// new HtmlWebpackPlugin({
// baseUrl: '/',
// title: '系统',
// filename: 'index.html',
// template: 'public/index.html',
// chunks: ['index']
// }),
// new HtmlWebpackPlugin({
// baseUrl: '/',
// title: '比赛记录',
// filename: 'list.html',
// template: 'public/index.html',
// chunks: ['list']
// }),
// new HtmlWebpackPlugin({
// baseUrl: '/',gTg
// title: '用户',
// filename: 'user.html',
// template: 'public/index.html',
// chunks: ['user']
// }),
// new HtmlWebpackPlugin({
// baseUrl: '/',
// title: '数据分析',
// filename: 'ana.html',
// template: 'public/index.html',
// chunks: ['ana']
// }),
new CopyWebpackPlugin({
patterns: [
{ from: 'src/assets/d2img/', to: 'd2img/' }
]
})
]
},
chainWebpack: config => {
const svgRule = config.module.rule('svg')
svgRule.uses.clear()
svgRule
.use('vue-loader-v16')
.loader('vue-loader-v16')
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader')
},
// filenameHashing: false,
productionSourceMap: true,
}