vue-cli-plugin-env
v1.0.0
Published
Define env constants from vue.config.js file
Downloads
218
Maintainers
Readme
vue-cli-plugin-env
Define env constants from vue.config.js file
yarn add --dev vue-cli-plugin-env
vue.config.js
module.exports = {
pluginOptions:{
env: {
MY_KEY: 'foo',
SECRET: 5566
}
}
}
main.js
console.log(process.env.MY_KEY) // 'foo'
console.log(process.env.SECRET) // 5566