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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.51latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.51
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i set-product-config-loader

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

5.11 kB

Total Files

4

Last publish

Collaborators

  • rhymedys