0.0.5 • Published 5 years ago

set-product-config-loader v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

set-product-config-loader

set AppConfig to default state when in the production development

Example

export const isDebugApi = true // development environment state
      ↓ ↓ ↓ ↓
export const isDebugApi = false // production environment state
export const isDebugLog = true // development environment state
      ↓ ↓ ↓ ↓
export const isDebugLog = false  // production environment state

Usage

Install

npm i set-product-config-loader

Config

add as webpack loader in webpack config file

{
  test: /\.js$/,
  loader: 'set-product-config-loader',
  include: [resolve('src')],
  options: {
    fileName:AppConfig, // default value is AppConfig
    configs: ['isDebugApi', 'isDebugLog'] // the key to set default value 'false' or you can set defined value by this way ——configs: [{isDebugApi:false}]
    }
}
0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

6 years ago

0.0.1

6 years ago