set-product-config-loader
v0.0.5
Published
set AppConfig to default when in product's development
Downloads
1
Readme
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}]
}
}