build.chunkSizeWarningLimit options
Description
I'd like to specify a build.chunkSizeWarningLimit for most chunks but then specify exceptions for some other chunks. e.g. A chunk for the heic2any package is much larger than most all other chunks. I don't want my main index or other typical chunks to grow beyond a threshold but I also don't want to get warnings for known chunks that are large for which I'm accepting the risk.
Suggested solution
Change chunkSizeWarningLimit?: number to something that allows specifying a main limit with overrides by chunk name patterns like chunkSizeWarningLimit?: number | [number, Record<string, number>]
build: {
chunkSizeWarningLimit: [500, {
"heic2any-*": 1500
}],
},
This way each chunk whose name matches specified patterns will get the associated warning limit while all other chunks will get a standard limit (in this example 500).
Alternative
No response
Additional context
No response
Validations
- [x] Follow our Code of Conduct
- [x] Read the Contributing Guidelines.
- [x] Read the docs.
- [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.