-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
[Tool] Dependency Extraction Webpack Plugin/packages/dependency-extraction-webpack-plugin/packages/dependency-extraction-webpack-plugin[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When following the steps outlined in Build Process or when importing a stylesheet in a JS file, the DependencyExtractionWebpackPlugin in the scripts package does not take into account the contents of the CSS file(s) when generating the version hash. This makes it impossible to use the version number for cache busting purposes.
I created a small Webpack plugin (aptly named DependencyExtractionCssHashFixerWebpackPlugin) to fix this by regenerating a hash for CSS files, but it would be nice to fix this in the package itself.
Step-by-step reproduction instructions
- Follow the steps outlined in Build Process.
- Run
npm run buildand note the version hash in one of the files (e.g.cat public/css/screen.asset.php) - Make a change in the Sass file and run
npm run buildagain. - See that the version hash did not change.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Tool] Dependency Extraction Webpack Plugin/packages/dependency-extraction-webpack-plugin/packages/dependency-extraction-webpack-plugin[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.