-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathvue.config.js
53 lines (52 loc) · 1.48 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
module.exports = {
assetsDir: 'assets',
productionSourceMap: false,
configureWebpack: {
optimization: {
splitChunks: {
cacheGroups: {
// We want to keep the vendors chunk, but we don't want to include moment since it's relatively large
// and only used for the screenshots page (which is never served to the client).
// An alternative method would be to set minChunks to 2 here.
vendors: {
test: /[\\/]node_modules[\\/](?!(moment|moment-timezone)[\\/])/
},
// The common chunk doesn't really make sense here since the only reason we're splitting
// pages is for the server-side screenshots page. Disabling it to save an HTTP request.
common: false
}
}
},
plugins: [],
},
// Disabling this for now due to issues with the modern build
// chainWebpack: config => {
// config.plugin('prefetch-index').tap(options => {
// options[0].fileBlacklist = options[0].fileBlacklist || [];
// options[0].fileBlacklist.push(/lang-.+?\.js$/);
// return options;
// });
// },
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(args => {
args.compilerOptions.whitespace = 'preserve'
})
},
devServer: {
contentBase: [
'./public',
'./dist'
]
},
pages: {
index: {
entry: 'src/web/main.js'
},
screenshots: {
entry: 'src/web/screenshots.js'
}
}
}