-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Wrong hashing for scripts
production bundle
#2868
Comments
Thanks for the report. This looks like a bug somewhere. |
Issue still there with beta 25. Struggled half a day to understand why my app wasn't loading anymore when served thru Cloudfront. Stumbled across this issue, updated to beta 25 to have your fix. Doesn't work for me. I build with To test your fix, I did:
the inline.XXX.js has the same hash be a different content.
The id there is the corresponds to the hash of my main.XXX.js: dist/main.9745f38a9de532556cb0.bundle.js So obviously the problem is not solved ... |
Further, these file names are only referred to in the index.html and the source maps. The hash should have a value that is easy to check, it should be the md5sum or sha1sum of the file. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Linux x64 (Ubuntu 16.04)
Versions.
angular-cli: 1.0.0-beta.17
node: 6.5.0
Repro steps.
Using the CLI for dev/prod for more than a month. Updating to latest version continously.
The log given by the failure.
No errors related. (Only webpack production warnings)
Mention any other details that might be useful.
The hashed name generated for
scripts.**.bundle.js
generated for different versions of the same app (like adding a service) is the same while the bundle content has differences (seems like chunk numbers generated by webpack).Example flow to replicate:
create an app
add a script to
angular-cli.json
generate a production bundle <-- generates a
scripts
bundle with a hash X.add some TS module to the app (like a new component)
generate a production bundle <-- generates a
scripts
bundle with the same hash X but the content is different (in particular, webpack-related chunk numbers).This affects production caching since the bundle cannot be invalidated by name since the hash works 'fake' (same hash, different content, enough to make the app fail to load).
The text was updated successfully, but these errors were encountered: