Skip to content

rhymedys/rhy-set-product-config-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

set AppConfig to default when in product's development

Resources

License

Stars

Watchers

Forks

Packages

No packages published