vue-config

1.0.0 • Public • Published

vue-config

An easy way to get App config

Usage

npm install vue-config
const vueConfig = require('vue-config')
const configs = {
  API: 'http://localhost:6003' // It's better to require a config file
}
 
Vue.use(vueConfig, configs)
 
// A param named `$config` will be injected in to every component, so in your component, you can get config easily
const API = this.$config.API

Readme

Keywords

Package Sidebar

Install

npm i vue-config

Weekly Downloads

133

Version

1.0.0

License

MIT

Last publish

Collaborators

  • airyland