-
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
hash code not changing in inline.js file during build #3311
Comments
This has already been discussed in #3221. If the content of the file doesn't change the hash stays the same. inline.js and style.js does not change between versions as it's basically some webpack stuff in them. |
@grizzm0 the content change.
After a build where the lazy loaded chunks change the file has a different content but the hash is the same. When this happen the application doesn't work because the old inline file is cached. File after build
|
Ok, I've looked at it but can't really figure it out. @filipesilva You've got any idea what could cause this? |
The build used --aot flag. Didn't check with JIT. |
I'm building with JIT, and have the same issue. For now I just went back to adding timestamp to filename in index.html (inline.xxxxx.bandle.js?14xxxxxxxx). Also what I noticed is even I clear workspace on Jenkins and run build again, inline.js file gets exactly the same hash as before. Looks for me like it's calculated based on something. |
This is a frustrating problem, but rather than fix the problem directly, how about making it evaporate by putting the contents of in-line, in-line? There is already an item for it, #2307. |
It would be great to have a label on this issue. It seems that it isn't tracked. |
New release, this is still not fixed? I'd really like to remove this step from my own build flow. |
@bialad Feel free to try to find the issue and fix it. |
@grizzm0 I'm sorry if I came of strong. There's just been a lot of breaking changes lately, and it gets frustrating. I understand that this is open source software, free and all that entails. I'm often looking in to fixing issues my self, and can often find a work around for my project. Like using a gulp task to rectify this after "ng build". Since this issue seems to originate in webpack, it's way out of my expertise and I doubt my fix would be up to standard. |
Maybe we can put the inline - inline. There are some webpack plugins which can do that. https://www.npmjs.com/package/html-webpack-inline-chunk-plugin |
@elvirdolic See older item #2307 about putting the inline contents actually inline. I added a comment there yesterday with a short bash script workaround for anyone who needs it inline today. This also avoids the problem from this issue of the inline file either not having a hash, or that hash not changing as it should. |
Related to #2868 |
I too face the same issue and its exist in the latest version ..
|
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?
Any OS
Versions.
1.0.0-beta.21
Repro steps.
I have an app with lazy loaded modules. I made a change in one of modules and run build.prod. I noticed that bundled file has changed (also it's hash code in filename has changed), as well as content of inline.bundle.js file has changed updating module bundle file hash code. But hash code for inline.bundle.js file is the same as previous so it's loading cached file inline.bundle.js instead of updated file.
The log given by the failure.
no log here
Mention any other details that might be useful.
Related to #2899
The text was updated successfully, but these errors were encountered: