Search code examples
angular-cli

Angular build file naming without hashing


When I do normal build by:

ng build

I get files:

Initial Chunk Files           | Names         |      Size    
main.67a03e810140e0bd.js      | main          | 132.08 kB    
polyfills.881fa69e872290d9.js | polyfills     |  36.19 kB    
runtime.3b2ac8c1adcf7f83.js   | runtime       |   1.04 kB
styles.ef46db3751d8e999.css   | styles        |   0 bytes

how to delete that ".67a03e810140e0bd." etc ?

PS. Its been made in .NET app if that matter


Solution

  • You can use the --output-hashing option, so you would build using:

    ng build --output-hashing=none
    

    That being said, most times you actually want your file names to be hashed so your users' browsers don't use an old cached version of your files when you release a new version.