Skip to content

Configuration plugin (in the style of node-config) for webpack.

License

Notifications You must be signed in to change notification settings

jsnaras/webpack-config-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-config-plugin

Configuration plugin (in the style of node-config) for webpack.

Install

npm install --save-dev webpack-config-plugin

Configuration

// webpack.config.js
var path = require('path');
var ConfigPlugin = require('webpack-config-plugin');

module.exports = {
  // [...]
  plugins: [
    // [...]
    new ConfigPlugin({

      // Configuration directory (required)
      dir: path.join(__dirname, 'config'),

      // Filter expression(s) (optional)
      filter: [ '-secret.property' ]
    })
  ]
}

Usage

When the plugin has been configured it enables a faux-module config which is a merge between a default configuration, an environment-specific configuration, and a local configuration.

Please see json-property-filter for documentation of filter expressions.

About

Configuration plugin (in the style of node-config) for webpack.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%