-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
104 lines (98 loc) · 2.43 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
const WebpackPwaManifest = require('webpack-pwa-manifest');
const path = require('path');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const PreloadPlugin = require('@vue/preload-webpack-plugin');
class CustomFilterPlugin {
constructor({ exclude }) {
this.exclude = exclude;
}
apply(compiler) {
compiler.hooks.afterEmit.tap('CustomFilterPlugin', compilation => {
compilation.warnings = compilation.warnings.filter(warning => !this.exclude.test(warning.message));
});
}
};
module.exports = {
configureWebpack: {
plugins: [
new MomentLocalesPlugin(),
new CustomFilterPlugin({
exclude: /Conflicting order between:/
})
]
},
chainWebpack: config => {
config
.plugin('pwa-manifest')
.use(WebpackPwaManifest, [
{
name: 'KnK Schedule',
fingerprints: false,
inject: true,
short_name: 'KnK',
background_color: '#0E8DF1',
theme_color: '#607D8B',
start_url: '/',
icons: [
{
src: path.resolve('src/assets/logo.png'),
sizes: [96, 128, 256, 384, 512],
destination: path.join('img', 'icons')
}
]
}
]);
config
.plugin('preload-app')
.use(PreloadPlugin, [
{
rel: 'preload',
includeHtmlNames: [
'index.html'
],
include: {
chunks: [ 'group-app' ],
entries: [
'index'
]
}
}
]);
},
pages: {
index: {
entry: 'src/main.ts',
template: 'public/index.html',
filename: 'index.html',
},
admin: {
entry: 'src/admin.ts',
template: 'public/index.html',
filename: 'admin/index.html',
}
},
pwa: {
workboxPluginMode: 'InjectManifest',
name: 'KnK Sched',
themeColor: '#607D8B',
msTileColor: '#0E8DF1',
appleMobileWebAppCapable: 'yes',
assetsVersion: '6',
manifestPath: 'manifest.json',
workboxOptions: {
swSrc: 'src/service-worker.js',
swDest: 'service-worker.js'
},
iconPaths: {
appleTouchIcon: 'img/icons/apple-icon-152x152.png',
msTileImage: 'img/icons/ms-icon-144x144.png'
}
},
publicPath: undefined,
outputDir: undefined,
assetsDir: undefined,
runtimeCompiler: undefined,
productionSourceMap: false,
parallel: true,
css: undefined
}