Registry / devops / webpack-configurator

webpack-configurator

JSON →
library0.3.1jsnpmunverified

A helper library for creating and extending Webpack configuration structures (v0.3.1, last release 2015). It provides methods to merge configs, add/remove loaders and plugins with key-based differentiation, and use resolvers for final transformations. Key differentiators include support for function-based merging, pre/post loader management, and plugin removal. However, it is outdated and incompatible with Webpack 2+ due to breaking API changes. No known recent development.

npm install webpack-configurator
INSTALL
IMPORT
SIG · WEBPACK-CONFIGURAT
W
webpack-configurator
devopsjavascriptv0.3.1
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

configure
✓ import configure from 'webpack-configurator'
✗ const { configure } = require('webpack-configurator')
Default export is a factory function.
WebpackConfigurator
✓ import WebpackConfigurator from 'webpack-configurator'
✗ const WebpackConfigurator = require('webpack-configurator').default
Default import works with both ESM and CJS in Node.
configure
✓ const configure = require('webpack-configurator')
✗ const { configure } = require('webpack-configurator')
CJS require returns the default export, not a named export.

Demonstrates creating a configurator, merging config, adding loaders and plugins, removing loaders, and resolving the final Webpack configuration.

import configure from 'webpack-configurator'; const config = configure(); // Merge base config config.merge({ entry: './src/index.js', output: { path: __dirname + '/dist', filename: 'bundle.js' } }); // Add a loader config.loader('babel', { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }); // Add a plugin config.plugin('uglify', { plugin: require('webpack').optimize.UglifyJsPlugin }); // Remove a loader config.removeLoader('babel'); // Resolve final config const webpackConfig = config.resolve(); console.log(webpackConfig);
Debug
Known issues
deprecatedThis package is unmaintained and only compatible with Webpack 1.x. Webpack 2+ has breaking changes (e.g., module.rules instead of module.loaders).
fix
Use webpack-merge or manual config composition for modern Webpack.
affects: all
gotchaThe .plugin() method expects an object with a 'plugin' key (the constructor), not an instance. Passing an instance may cause unexpected behavior.
fix
Use { plugin: PluginConstructor } instead of new PluginConstructor().
affects: all
gotchaWhen merging with a function, you must return the modified config object. Forgetting to return will result in undefined.
fix
Always return the config object from merge functions.
affects: >=0.0.2
Errors
Common errors & fixes
Cannot find module 'webpack-configurator'
Package is not installed or npm install failed.
fix
Run: npm install webpack-configurator@0.3.1
config.plugin is not a function
Using an incompatible version (pre-v0.0.2) or wrong import method.
fix
Ensure package version >=0.0.2 and import the default export correctly.
TypeError: config.merge is not a function
Incorrect import: using named import instead of default.
fix
Use 'import configure from 'webpack-configurator'' then call configure().merge()
Upgrade
Version history
0.3.1latest on npm
Audit
Dependencies
webpackrequiredRequires Webpack as peer dependency (v1 compatible only)
Agent activity
15 hits · last 30 days
node
14
Resources
webpack-configurator — npm install webpack-configurator · libregistry