webpack-addons is a utility suite designed to assist in creating webpack-cli addons by providing helper functions for common webpack configuration patterns and interactive Inquirer.js prompts. Originally published in 2017, its latest version is 1.1.5. This package is specifically tailored for scaffolding webpack configurations programmatically, offering utilities like `parseValue` for special string formatting, and `createArrowFunction` for dynamic entry points. A key differentiator was its inclusion of a `createCommonsChunkPlugin` helper, which is now deprecated in Webpack 4+ in favor of `optimization.splitChunks`. Given its last update date and the deprecation of core Webpack features it wraps, the package is considered unmaintained and potentially incompatible with modern webpack versions.
npm install webpack-addonsVerified import paths — ran on the pinned version, not inferred.
Demonstrates the use of `parseValue` for configuring webpack output, `createArrowFunction` for entry points, and the structure of an Inquirer `List` prompt utility within a simulated webpack-cli addon generator.
Avoid using `createCommonsChunkPlugin`. For code splitting, configure `optimization.splitChunks` directly in your webpack configuration for Webpack v4+.
If integrating into an ESM project, consider using dynamic `import()` or a CommonJS wrapper. Best practice is to avoid this package in new ESM-first projects unless a specific, non-breaking utility is absolutely required.
Thoroughly test compatibility with your specific environment. For new projects, consider modern alternatives or reimplementing the necessary utility functions directly.
Create a `webpack-addons.d.ts` file in your project or use a community-maintained `@types/webpack-addons` if available (though unlikely for an unmaintained package). Define interfaces for the exported functions to gain type checking benefits.
Remove all calls to `createCommonsChunkPlugin`. Implement code splitting using Webpack's `optimization.splitChunks` configuration instead.
Replace `import` statements with CommonJS `require()` syntax, e.g., `const { parseValue } = require('webpack-addons');`. Ensure your file is treated as CommonJS (e.g., `.js` extension without `"type": "module"` in `package.json`).No dependency data recorded yet.