Aniruddha Das
Aniruddha Das

Reputation: 21688

How to stop renaming of generated files from prod build in angular cli

I don't want angular cli to rename generated script files by ng build --prod and put its link in my index.html file. I just want to use the same name again and again as it does for the development build for the prod build as well.

I know in the .angular-cli.json file holds all configuration but what option I need to place to stop renaming of files for prod build.

Other option is as the angular cli is using webpack internally, is there any way we can configure webpack to handle file renaming.

Upvotes: 16

Views: 7458

Answers (2)

Carlos Galeano
Carlos Galeano

Reputation: 386

In the latest Angular you have to delete the --prod instance, so you can use:

ng build --output-hashing none

Upvotes: 0

Simon Kazakov
Simon Kazakov

Reputation: 491

Use ng build --prod --output-hashing none

Upvotes: 18

Related Questions