-
Notifications
You must be signed in to change notification settings - Fork 13
/
vue.config.js
57 lines (55 loc) · 1.3 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
49
50
51
52
53
54
55
56
57
const path = require('path');
module.exports = {
devServer: {
public: '0.0.0.0:8080',
disableHostCheck: true,
proxy: {
'/robots.txt': {
target: 'http://0.0.0.0:8055/cce/robots',
pathRewrite: { 'robots.txt': '' },
},
},
},
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'de',
localeDir: 'locales',
enableInSFC: false,
enableBridge: false,
},
},
chainWebpack: (config) => {
config.resolve.extensions.add('.scss');
config.resolve.alias
.set('@', path.join(__dirname, './src'))
.set('scss', path.join(__dirname, './src/assets/scss/'));
let combinedOptions = null;
const svgRule = config.module.rule('svg');
svgRule.use('file-loader').tap((options) => {
combinedOptions = {
...options,
svgo: {
plugins: [
{ prefixIds: true },
],
},
};
});
svgRule.uses.clear();
svgRule.oneOf('inline')
.resourceQuery(/inline/)
.use('babel-loader')
.loader('babel-loader')
.end()
.use('vue-svg-loader')
.loader('vue-svg-loader')
.options(combinedOptions)
.end()
.end()
.oneOf('external')
.use('file-loader')
.loader('file-loader')
.options(combinedOptions);
},
};