A webpack plugin to rename chunks, supporting initial chunks with entry, async chunks, and specific chunk naming. Current stable version is 1.0.3 (last release: unknown, possibly unmaintained). Requires webpack 4.1+ and Node >=6.11.7. Differentiates from similar plugins by offering per-chunk renaming with placeholders like [name], [hash], [chunkhash]. Note: webpack 5 compatibility is not documented; may break.
npm install webpack-chunk-rename-pluginVerified import paths — ran on the pinned version, not inferred.
Shows basic usage: rename initial chunks using output.filename, async chunks with a template, and a specific chunk by name.
Consider webpack 5 alternatives such as webpack's built-in chunk naming or community plugins explicitly supporting webpack 5.
Upgrade Node to at least 6.11.7 or use a transpiler/polyfill.
Always provide an options object: new ChunkRenamePlugin({}) or with proper keys.Ensure output.filename is defined in webpack config.
Use the entry point key (e.g., 'main') as the chunk name property for per-chunk renaming.
Use const ChunkRenamePlugin = require('webpack-chunk-rename-plugin');Pass an options object: new ChunkRenamePlugin({ initialChunksWithEntry: true })Ensure asyncChunks is a string with valid placeholders; avoid using in webpack 5.
Chunk name properties must be strings containing placeholders like '[name].js'.