-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathvue.config.js
More file actions
27 lines (26 loc) · 865 Bytes
/
vue.config.js
File metadata and controls
27 lines (26 loc) · 865 Bytes
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
const path = require('path')
module.exports = {
devServer: {
proxy: {
'^/api': {
target: process.env.VUE_APP_API_URL,
changeOrigin: true,
pathRewrite: {'^/api' : ''}
}
}
},
lintOnSave: false,
runtimeCompiler: true,
chainWebpack: config => {
config.resolve.alias
.set('~', path.resolve(__dirname, 'src'))
if (process.env.VUE_APP_BUILD_FOR_DOCKER_IMAGE === '1') {
// externalize (= do not bundle) any import of the config. Instead, read it from
// window.config which gets set by loading a separate config.js in index.html which
// contains values that can be set by the container at runtime.
config.externals({
'~/config': 'config'
})
}
}
}