set-product-config-loader

0.0.5 • Public • Published

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}]
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i set-product-config-loader

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

5.11 kB

Total Files

4

Last publish

Collaborators

  • rhymedys