-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.config.js
34 lines (32 loc) · 857 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
33
34
const path = require('path')
const projectRoot = path.resolve(__dirname);
module.exports = {
lintOnSave: true,
configureWebpack: {
resolve: {
alias: {
'@': `${projectRoot}/src`,
'~': `${projectRoot}/src/assets`,
}
},
devServer: {
open: true,
setup: (app, server) => {
const CONFIG_CHECKS = ['VUE_APP_CLIENT_ID', 'VUE_APP_CLIENT_SECRET', 'VUE_APP_BASE_URL', 'VUE_APP_SCOPE' ];
for (const key of CONFIG_CHECKS) {
if (process.env[key] === undefined) {
throw new Error(`value for ${key} is not defined.. Please setup .env variables.`);
}
}
},
before: (app, server) => {
// app.get('/api/status', (request, response) => {
// })
},
overlay: {
warnings: true,
errors: true,
},
}
}
}