forked from nwtgck/piping-ui-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
32 lines (31 loc) · 974 Bytes
/
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
const webpack = require('webpack');
module.exports = {
// (from: https://cli.vuejs.org/config/#publicpath)
publicPath: "./",
// (base: https://stackoverflow.com/q/56127998/2885946)
css: {
sourceMap: true
},
configureWebpack: {
plugins: [
// (base: https://medium.com/curofy-engineering/a-guide-to-inject-variable-into-your-code-using-webpack-36c49fcc1dcd)
new webpack.DefinePlugin({
PIPING_SERVER_URLS: process.env.PIPING_SERVER_URLS || JSON.stringify([
"https://ppng.ml",
"https://piping.arukascloud.io",
"https://ppng.herokuapp.com"
]),
})
]
},
// (from: https://medium.com/@dougallrich/give-users-control-over-app-updates-in-vue-cli-3-pwas-20453aedc1f2)
pwa: {
workboxPluginMode: 'InjectManifest',
workboxOptions: {
swSrc: './src/sw.js',
swDest: 'service-worker.js',
importWorkboxFrom: 'local',
exclude: [/\.map$/, '_redirects'],
},
}
};