dependency-extraction-webpack-plugin breaks when using optimizations.runtimeChunk = 'single' #24352
Labels
[Status] In Progress
Tracking issues with work in progress
[Tool] Dependency Extraction Webpack Plugin
/packages/dependency-extraction-webpack-plugin
[Type] Build Tooling
Issues or PRs related to build tooling
Describe the bug
@wordpress/dependency-extraction-webpack-plugin
breaks in two ways when usingoptimizations.runtimeChunk = 'single'
.runtime.asset.php
.The first issue results in only the last entrypoint's asset being saved (as it overwrites the previous ones').
The second issue makes it impossible to correlate an asset file with its entrypoint.
To reproduce
I've created an example project here: https://github.com/stefanfisk/wordpress-dependency-extraction-webpack-plugin-runtimechunk-single-bug
Expected behavior
The asset files should be named according to the entrypoint names, and only be added to the entrypoint chunks.
Preferably it should be possible to configure the asset file names. For example it would be nice if using hashes in
output.filename
did not result in the asset filename containing a hash.Plugin version:
@wordpress/dependency-extraction-webpack-plugin
2.8.0webpack
4.44.1The text was updated successfully, but these errors were encountered: