-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
36 lines (33 loc) · 962 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
const path = require('path');
module.exports = () => {
return {
// For github pages
publicPath: process.env.NODE_ENV === 'production' ? '/dist/' : '/',
lintOnSave: false,
css: {
loaderOptions: {
sass: {
prependData: `@import '~@/styles/base/_variables.scss';
@import '~@/styles/animations.scss';`
}
}
},
configureWebpack: config => {
console.log(config);
const alias = {
styles: path.join(__dirname, 'src/styles'),
assets: path.join(__dirname, 'src/assets'),
'~': path.join(__dirname, 'src/app')
};
const terserOptions = {
keep_classnames: true,
keep_fnames: true
};
config.resolve.alias = { ...config.resolve.alias, ...alias };
config.optimization.minimizer[0].options.terserOptions = {
...config.optimization.minimizer[0].options.terserOptions,
...terserOptions
};
}
};
};