Helps to load, extend, and merge webpack configurations. Current stable version is 7.5.0, released October 2017. Last release was v7.5.0. The package provides a chainable API with `extend()`, `merge()`, and `defaults()` methods supporting environment variables and shareable configs via npm. It is maintained by Fitbit, released under Apache-2.0. Key differentiator: simplifies composing multiple webpack config files with merge semantics and variable interpolation. Be aware: the package has been in maintenance mode since 2017 and may not be actively updated; webpack 2+ compatibility is supported but the API was revamped in v7.0.0.
npm install webpack-configVerified import paths — ran on the pinned version, not inferred.
Shows how to define a base config and extend it with environment-specific overrides using webpack-config's extend and merge methods.
Update imports to use the new Config class and named exports. Check the changelog for migration details.
Consider migrating to webpack-merge or using webpack's built-in function-based config syntax.
Use functions: environment.setAll({ env: () => process.env.NODE_ENV })If your shareable config is named 'webpack-config-myconfig', you can use extend('myconfig'). To avoid prefix, use the full name: extend('webpack-config-myconfig').Use Node 6+ or consider an alternative.
const Config = require('webpack-config').default; or use ES modules: import Config from 'webpack-config';npm install recursive-iterator -D or check your node_modules.
Import as named: import { environment } from 'webpack-config'; then use environment.setAll().Ensure your merged config objects use the new webpack 2+ syntax (e.g., `rules` instead of `loaders`).
Install the shareable config: npm install webpack-config-mdreizin -D. Then use extend('mdreizin/base') or extend('webpack-config-mdreizin/base').