[Webpack5] split-chunks-plugin: automaticNameMaxLength param considered invalid during schema validation
See original GitHub issueBug report
What is the current behavior? The document for Webpack v5.0.0-beta.14 shows: https://webpack.js.org/plugins/split-chunks-plugin/#splitchunksautomaticnamemaxlength
If the current behavior is a bug, please provide the steps to reproduce. add the following to webpack config:
config.optimization = {
runtimeChunk: "single",
splitChunks: {
automaticNameMaxLength: 250
}
}
Following error is seen:
message: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.optimization.splitChunks has an unknown property 'automaticNameMaxLength'. These properties are valid:
object { automaticNameDelimiter?, cacheGroups?, chunks?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, name? }
But that particular option is not seen in the code of v5.0.0-beta.14 tag
Ref: https://github.com/webpack/webpack/blob/master/lib/optimize/SplitChunksPlugin.js#L499
What is the expected behavior? As in the above mentioned document URL lists the support, it should work as in v4 If not, is there any default/alternate behavior for the same option? or will it removed from the document page?
Other relevant information: webpack version: v5.0.0-beta.14 Node.js version: v10.16.0 Operating System: macOS Mojave v10.14.6 Additional tools: N/A
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)

Top Related StackOverflow Question
automatic naming has been removed from splitChunks. It’s actually bad for caching.
For development
optimization.chunkIds: "named"is the default and generates a useful name. For production you are better when using a numeric id or a hash.why is automatic naming bad for caching ?
for production, we explicitly name our chunks using magic comments, is that bad as well ?