-
Notifications
You must be signed in to change notification settings - Fork 13
/
vue.config.js
45 lines (43 loc) · 1.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
const path = require('path');
const version = require('./package.json').version;
process.env.VUE_APP_VERSION = version;
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
? '/solid-focus/'
: '/',
configureWebpack: {
externals: {
'node-fetch': 'fetch',
'text-encoding': 'TextEncoder',
'whatwg-url': 'window',
'isomorphic-fetch': 'fetch',
'@trust/webcrypto': 'crypto',
},
resolve: {
alias: process.env.NODE_ENV !== 'production'
? {
// This is necessary to use npm link for development:
// https://stackoverflow.com/questions/31169760/how-to-avoid-react-loading-twice-with-webpack-when-developing
soukai: path.resolve('./node_modules/soukai'),
}
: {},
},
},
chainWebpack: (config) => {
// This is necessary to use npm link for development:
// https://cli.vuejs.org/guide/troubleshooting.html#symbolic-links-in-node-modules
if (process.env.NODE_ENV !== 'production') {
config.resolve.symlinks(false);
}
},
pwa: {
name: 'Solid Focus',
themeColor: '#4dba87',
msTileColor: '#4dba87',
manifestOptions: {
background_color: '#ffffff',
orientation: 'portrait',
version,
},
},
};