1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/@vue/cli-service/lib/util/resolveClientEnv.js

23 lines
429 B
JavaScript
Raw Permalink Normal View History

2023-12-18 13:12:25 +08:00
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
if (raw) {
return env
}
for (const key in env) {
env[key] = JSON.stringify(env[key])
}
return {
'process.env': env
}
}