forked from dd-center/vtbs.moe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
46 lines (45 loc) · 1.08 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 webpack = require('webpack')
const CopyPlugin = require('copy-webpack-plugin')
module.exports = {
lintOnSave: false,
pwa: {
iconPaths: {
favicon32: 'img/icons/favicon-32x32.png',
favicon16: 'img/icons/favicon-16x16.png',
appleTouchIcon: 'img/icons/apple-touch-icon-1024x1024.png',
maskIcon: 'img/icons/safari-pinned-tab.svg',
},
themeColor: '#afd4e3',
name: 'VTBs in bilibili!',
appleMobileWebAppCapable: 'yes',
workboxPluginMode: 'InjectManifest',
workboxOptions: {
swSrc: 'src/service-worker.js',
},
},
chainWebpack: config => {
config.module.rule('js').exclude.add(/\.worker\.js$/)
},
configureWebpack: {
module: {
rules: [
{
test: /\.worker\.js$/,
use: {
loader: 'worker-loader',
options: { inline: true },
},
},
],
},
plugins: [
new webpack.ContextReplacementPlugin(
/moment[/\\]locale$/,
/zh-cn/,
),
new CopyPlugin([
{ from: 'BiliChat/docs', to: 'BiliChat' },
]),
],
},
}