contenthash generates same filename for different contents
See original GitHub issue- Operating System: macOS 10.14.6
- Node Version: v8.11.2
- NPM Version: 6.0.1
- webpack Version: 4.41.2
- mini-css-extract-plugin Version: 0.8.0
Expected Behavior
Should generate different filename when content is changed.
Actual Behavior
Same filename was generated when content is updated.
How Do We Reproduce?
https://github.com/zlk89/webpack-css-contenthash-diff
yarn
to install packagesyarn build
- under
dist
folder, you will find two css files with same content hash, while content is different.
Basically contenthash is same, when import statement order is different:
// in js
@import 'a.scss';
@import 'b.scss';
// in js
@import 'b.scss';
@import 'a.scss';
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
contenthash changing even though file remains identical #7984
So chunk- has the same name but file- has a different name when the chunkFilename changes. If the current behavior is a bug,...
Read more >In Webpack, how do I generate a content hash for only some ...
You mean something like this => const productionConfig = merge([ { output: { chunkFilename: "[name].[contenthash].js", filename: "[name].
Read more >Adding Hashes to Filenames - SurviveJS
[contenthash] - Returns a hash generated based on content. ... The same result can be achieved by generating static filenames and invalidating the...
Read more >What is Output — Webpack 5 - DEV Community
If the contents of the files are not changed, then the same hash value is generated. The chunkFilename determines the name of the...
Read more >Webpack 5 release (2020-10-10)
The warning Multiple assets emit different content to the same filename has been made an error. ExportsInfo. The way how information about ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
verified the bug has been fixed
^ bump, this bug essentially prevents us from utilizing long term cache on all css generated by this plugin