0.1.1 • Published 6 years ago

vue-cli-plugin-node-config v0.1.1

Weekly downloads
175
License
Apache-2.0
Repository
-
Last release
6 years ago

vue-cli-plugin-node-config

pipeline status

Integrates node-config with vue-cli.

Exposes configuration defined according to node-config in client code via Webpack's DefinePlugin

Installation

vue add node-config

Configuration

You can change how you access configuration through pluginOptions.

By default, CONFIG is used:

if (CONFIG.DEVELOPMENT) {
  // whatever
}
// vue.config.js
module.exports = {
  pluginOptions: {
    nodeConfig: {
      key: "somethingElse" // default: CONFIG
    }
  }
};
if (somethingElse.DEVELOPMENT) {
  // whatever
}