{"id":20737,"library":"webpack-configurator","title":"webpack-configurator","description":"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.","status":"deprecated","version":"0.3.1","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/lewie9021/webpack-configurator","tags":["javascript","webpack","config","extend","merge","loaders","plugins"],"install":[{"cmd":"npm install webpack-configurator","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-configurator","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-configurator","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Requires Webpack as peer dependency (v1 compatible only)","package":"webpack","optional":false}],"imports":[{"note":"Default export is a factory function.","wrong":"const { configure } = require('webpack-configurator')","symbol":"configure","correct":"import configure from 'webpack-configurator'"},{"note":"Default import works with both ESM and CJS in Node.","wrong":"const WebpackConfigurator = require('webpack-configurator').default","symbol":"WebpackConfigurator","correct":"import WebpackConfigurator from 'webpack-configurator'"},{"note":"CJS require returns the default export, not a named export.","wrong":"const { configure } = require('webpack-configurator')","symbol":"configure","correct":"const configure = require('webpack-configurator')"}],"quickstart":{"code":"import configure from 'webpack-configurator';\n\nconst config = configure();\n\n// Merge base config\nconfig.merge({\n  entry: './src/index.js',\n  output: { path: __dirname + '/dist', filename: 'bundle.js' }\n});\n\n// Add a loader\nconfig.loader('babel', {\n  test: /\\.js$/,\n  exclude: /node_modules/,\n  loader: 'babel-loader'\n});\n\n// Add a plugin\nconfig.plugin('uglify', { plugin: require('webpack').optimize.UglifyJsPlugin });\n\n// Remove a loader\nconfig.removeLoader('babel');\n\n// Resolve final config\nconst webpackConfig = config.resolve();\nconsole.log(webpackConfig);","lang":"javascript","description":"Demonstrates creating a configurator, merging config, adding loaders and plugins, removing loaders, and resolving the final Webpack configuration."},"warnings":[{"fix":"Use webpack-merge or manual config composition for modern Webpack.","message":"This package is unmaintained and only compatible with Webpack 1.x. Webpack 2+ has breaking changes (e.g., module.rules instead of module.loaders).","severity":"deprecated","affected_versions":"all"},{"fix":"Use { plugin: PluginConstructor } instead of new PluginConstructor().","message":"The .plugin() method expects an object with a 'plugin' key (the constructor), not an instance. Passing an instance may cause unexpected behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Always return the config object from merge functions.","message":"When merging with a function, you must return the modified config object. Forgetting to return will result in undefined.","severity":"gotcha","affected_versions":">=0.0.2"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install webpack-configurator@0.3.1","cause":"Package is not installed or npm install failed.","error":"Cannot find module 'webpack-configurator'"},{"fix":"Ensure package version >=0.0.2 and import the default export correctly.","cause":"Using an incompatible version (pre-v0.0.2) or wrong import method.","error":"config.plugin is not a function"},{"fix":"Use 'import configure from 'webpack-configurator'' then call configure().merge()","cause":"Incorrect import: using named import instead of default.","error":"TypeError: config.merge is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}