Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Has Angular's cache buster hash code format changed?

In Angular 12, if outputHashing=all, it produced hash code as [0-9a-z]{16} format.

like this, main-0123456789abcdef.js

But Angular 18, it produced hash code as [0-9A-Z]{8} format.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

like this, main-0123ABCD.js

Is this something wrong with my build environment? I want to confirm if this action is correct.

>Solution :

A freshly generated Angular 12 project uses Webpack for building, while a freshly generated Angular 18 project uses esbuild.

You can find more information about this change in the docs. So the underlying technology for building the project has changed. You can see in their respective docs that the Webpack hashes have a different format than the esbuild hashes. This is totally fine, there is nothing wrong with your app.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading