vue-cli-plugin-node-config

[![pipeline status](https://gitlab.com/willsoto/vue-cli-plugin-node-config/badges/master/pipeline.svg)](https://gitlab.com/willsoto/vue-cli-plugin-node-config/commits/master)

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
vue-cli-plugin-node-config
0.1.14 years ago4 years agoMinified + gzip package size for vue-cli-plugin-node-config in KB

Readme

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
}