{"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,"search_vec":"'2':62 '2015':17 'add/remove':24 'api':66 'base':31,46 'break':65 'chang':67 'config':23,74 'configur':3,12 'creat':8 'develop':71 'differenti':32,40 'due':63 'extend':10,75 'final':37 'function':45 'function-bas':44 'helper':5 'howev':54 'includ':41 'incompat':59 'javascript':72 'key':30,39 'key-bas':29 'known':69 'last':15 'librari':6 'loader':25,49,77 'manag':50 'merg':22,47,76 'method':20 'outdat':57 'plugin':27,52,78 'pre/post':48 'provid':19 'recent':70 'releas':16 'remov':53 'resolv':35 'structur':13 'support':42 'transform':38 'use':34 'v0.3.1':14 'webpack':2,11,61,73 'webpack-configur':1","created_at":"2026-04-25T11:24:42.385114+00:00","updated_at":"2026-04-25T11:24:42.385114+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/lewie9021/webpack-configurator","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/webpack-configurator","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}