mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-26 09:09:05 -06:00
BREAKING CHANGE: This change breaks use cases where users have tapped the `define` plugin options in `chainWebpack` fixes #3579
14 lines
300 B
JavaScript
14 lines
300 B
JavaScript
const prefixRE = /^VUE_APP_/
|
|
|
|
module.exports = function resolveClientEnv (options, raw) {
|
|
const env = {}
|
|
Object.keys(process.env).forEach(key => {
|
|
if (prefixRE.test(key) || key === 'NODE_ENV') {
|
|
env[key] = process.env[key]
|
|
}
|
|
})
|
|
env.BASE_URL = options.publicPath
|
|
|
|
return env
|
|
}
|