-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
48 lines (42 loc) · 1.09 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
/* eslint-disable no-console, @typescript-eslint/camelcase, @typescript-eslint/no-var-requires */
const TerserPlugin = require('terser-webpack-plugin');
const isProd = process.env.NODE_ENV === 'production';
process.env.VUE_APP_VERSION = isProd ? 'prod' : 'dev'
process.env.VUE_APP_URL = isProd ? '' : 'http://localhost:8080'
module.exports = {
lintOnSave: true,
filenameHashing: false, // убрать хеш строку у чанков
devServer: {
host: 'localhost',
port: 8080,
hotOnly: true,
disableHostCheck: true,
watchOptions: {
ignored: ['**/*copy.vue']
},
proxy: 'http://localhost:8081'
},
configureWebpack: {
optimization: isProd ? {
minimize: true,
minimizer: [new TerserPlugin({
terserOptions: {
compress: {
drop_console: true
},
output: {
comments: false
}
}
})]
} : {},
devtool: isProd ? false : 'source-map'
},
css: {
loaderOptions: {
sass: {
additionalData: '@import "@/styles/_variables.scss";'
}
}
},
}