-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.config.js
40 lines (36 loc) · 1.03 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
const path = require('path');
module.exports = () => {
return {
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/js-boomerang/',
lintOnSave: false,
css: {
loaderOptions: {
sass: {
prependData: `@import '~@/styles/base/_variables.scss';`
}
}
},
configureWebpack: 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.devServer = {
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp'
}
};
config.resolve.alias = { ...config.resolve.alias, ...alias };
config.optimization.minimizer[0].options.terserOptions = {
...config.optimization.minimizer[0].options.terserOptions,
...terserOptions
};
}
};
};