Skip to content

chunkHash in filenames of inline & styles JS bundle not changing even if the content changes #3221

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

Closed
maulsea opened this issue Nov 21, 2016 · 6 comments

Comments

@maulsea
Copy link

maulsea commented Nov 21, 2016

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.20-4
node: 4.4.4
os: win32 x64

Repro steps.

Please note, I'm using LESS for pre-processing.

Whenever I run ng build --prod, I'm expecting chunkHash to be different for main, inline & styles bundle. However, I noticed, even though the content has changed, chunkHash is not changing for inline & styles bundle. This will most likely create caching issue, which it is supposed to resolve in first place. :)

Run 1 : http://i.imgur.com/vyftUs7.png
--- Change content of few less files & added a test service ---
Run 2 : http://i.imgur.com/2ts7lBt.png

Any other details that might be useful.

I understand this could be an issue of a webpack than angular cli. But, since there is no way to alter webpack config for now & this being in important functionality for production builds, I am hoping this fix can be prioritized here.

@maulsea maulsea changed the title chunkHash in filenames of inline & styles bundle not changing as the content changes chunkHash in filenames of inline & styles bundle not changing even if the content changes Nov 21, 2016
@grizzm0
Copy link
Contributor

grizzm0 commented Nov 22, 2016

Did you make any changes to any file located in apps[0].styles in angular-cli.json? Less files of your components gets compiled into the component itself and does not affect styles.[hash].bundle.css.

Edit: Just tried myself and editing any of the root styles does change the hash.

@elvirdolic
Copy link

When you use CDN this issue prevents the APP to run. It doesn't even bootstrap. Can we have a fix for that?

@maulsea
Copy link
Author

maulsea commented Nov 24, 2016

@grizzm0 Thanks for getting back to me! You are correct, styles.[hash].bundle.css does change. But, issue persists with styles.[hash].bundle.js & inline.[hash].bundle.js.

@maulsea maulsea changed the title chunkHash in filenames of inline & styles bundle not changing even if the content changes chunkHash in filenames of inline & styles JS bundle not changing even if the content changes Nov 24, 2016
@grizzm0
Copy link
Contributor

grizzm0 commented Nov 24, 2016

If the content of the file does not change the hash will stay the same. inline.bundle.js and styles.bundle.js doesn't change just because you edit your styles. They contain the same content every time which basically is some webpack related stuff.

@maulsea
Copy link
Author

maulsea commented Nov 25, 2016

@grizzm0 Ok, I did not know that. I will close this issue for now. Thanks for your help! :)

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants