vue-cli-plugin-env

Define env constants from vue.config.js file

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vue-cli-plugin-env
301.0.05 years ago5 years agoMinified + gzip package size for vue-cli-plugin-env in KB

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