-
Notifications
You must be signed in to change notification settings - Fork 12
/
vue.config.js
36 lines (34 loc) · 777 Bytes
/
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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const CopyPlugin = require('copy-webpack-plugin')
let externals = []
if (process.env.NODE_ENV === 'production') {
externals = [/^element-plus.*/]
}
module.exports = {
lintOnSave: false,
devServer: {
port: 6800,
},
pages: {
index: {
entry: 'example/main.ts',
template: 'public/index.html',
filename: 'index.html',
},
},
chainWebpack: config => {
config.module
.rule('js')
.include.add('/packages')
.end()
.use('babel')
.loader('babel-loader')
.tap(options => {
return options
})
},
configureWebpack: {
plugins: [new CopyPlugin([{ from: 'packages/styles', to: 'styles' }])],
externals: externals,
},
}