-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathvue.config.js
More file actions
43 lines (42 loc) · 1.39 KB
/
vue.config.js
File metadata and controls
43 lines (42 loc) · 1.39 KB
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
const path = require('path')
const FaviconsWebpackPlugin = require('favicons-webpack-plugin')
module.exports = {
transpileDependencies: ['vue-clamp', 'resize-detector'],
chainWebpack: config => {
config.resolve.alias.set('@', path.resolve(__dirname, './src'))
config.optimization.minimizer('terser').tap((args) => {
args[0].terserOptions.mangle.keep_fnames = true
return args
})
config.module
.rule('js')
.use('babel-loader')
.tap(options => {
// 修改它的选项...
return {
...options,
include: [path.resolve(__dirname, 'src'), path.resolve(__dirname, 'test'), path.resolve(__dirname, 'node_modules/bech32')]
}
})
},
configureWebpack: () => {
if (process.env.NODE_ENV === 'production') {
return {
plugins: [
new FaviconsWebpackPlugin({
logo: path.resolve(__dirname, './src/assets/images/logo.png'),
favicons: {
appName: 'Qtum Web Wallet'
}
})
]
}
} else {
return {
devServer: {
disableHostCheck: true
}
}
}
}
}