Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md5-hash有问题, #5

Open
renmm opened this issue Jul 22, 2016 · 10 comments
Open

md5-hash有问题, #5

renmm opened this issue Jul 22, 2016 · 10 comments

Comments

@renmm
Copy link

renmm commented Jul 22, 2016

问题:某一个文件的内容改变了,但是文件hash没有改变的情况?

这样导致我上线到服务器上,相同的文件因为有服务器缓存机制,不会被立马刷新,导致访问失败

@dlin-me
Copy link

dlin-me commented Sep 1, 2016

Same here:

File content changes without changing the hash. And also hash is not the same as hash of the content.

@le0nik
Copy link

le0nik commented Sep 8, 2016

Same here. This plugin is not reliable.

@xiwc
Copy link

xiwc commented Oct 17, 2016

same question

@Xaber20110202
Copy link

Xaber20110202 commented Oct 27, 2016

有坑,别踩。用了webpack.optimize.CommonsChunkPlugin的话,模块内容未变,模块id变了,必炸。可能要背一个线上故障!
there has a hole, do not enter in!

@alexindigo
Copy link

alexindigo commented Nov 9, 2016

Looks like duplicated of #7, check out it's thread for the solution.

TL;DR The main issue that module ids not being used for hashing, so when only module ids changed, hash doesn't reflect it. Also it's doing maanual sorting over chunk.modules array, making ids to behave unpredictably when used in concert with OccurrenceOrder plugin.

@Thinking80s
Copy link

image
image
似乎跟moduleId相关

@whq731
Copy link

whq731 commented Mar 9, 2017

这里有比较详细的解决方案:
https://sebastianblade.com/using-webpack-to-achieve-long-term-cache/#webpackmd5hash

@oodzchen
Copy link

Same problem, the hash of manifest.js always remain as d41d8cd, even the content changed. I've searched many times on the internet, still don't get a solution.

@CntChen
Copy link

CntChen commented Sep 21, 2019

Same problem: Hash don't change when source code change.

  1. This plugin is no need any more in webpack4, use contenthash resolve my problem. issues/19

  2. webpack4, in which I test this plugin, change it's chunk module properties, the method this plugin get chunk source code to generate MD5 is not correct any more.

  3. chunk.mapModules used inside this plugin is deprecated.

>  DeprecationWarning: Chunk.mapModules: Use Array.from(chunk.modulesIterable, fn) instead

@hhhuangqiong
Copy link

https://www.npmjs.com/package/webpack-content-md5-hash
plz try my npm package which can solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests