-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
46 lines (45 loc) · 1.34 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
// const path = require('path');
module.exports = {
// outputDir: path.resolve(__dirname, 'public'),
devServer: {
port: 5001,
proxy: {
'/api': {
target: 'http://api:3001',
},
},
},
// chainWebpack: config => {
// config.module
// .rule('ignore')
// .test(/\.vue$/)
// .use('ignore-loader')
// .loader('ignore-loader')
// .options({
// resourceQuery: '/blockType=notes/'
// })
// },
configureWebpack: {
optimization: {
splitChunks: {
minSize: 10000,
maxSize: 250000,
}
}
},
chainWebpack: config => {
config.plugin('preload').tap(options => {
// included by vue. Attempt to preload images
options[0].as = entry => {
if (/\.css$/.test(entry)) return 'style';
if (/\.woff$/.test(entry)) return 'font';
if (/\.png$/.test(entry)) return 'image';
return 'script';
};
options[0].include = 'allAssets';
// options[0].fileWhitelist: [/\.files/, /\.to/, /\.include/]
// options[0].fileBlacklist: [/\.files/, /\.to/, /\.exclude/]
return options;
});
},
};