angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Question: When doing build prod, what's the best way to get the generated hashes for all files?

Open divyang-joshi opened this issue 9 years ago • 2 comments

OS?

Windows 10, macOS sierra

Versions.

angular-cli: 1.0.0-beta.26 node: 6.9.4 angular/compiler-cli: 2.4.5

Repro steps.

run ng build --prod Notice the hash generated.

I know there's a way for webpack to output the hash to a JSON file, but since we can't customize it, is there a way for the CLI to provide us with that hash or output some JSON with the hash in it? Or is the only option parsing either the generated index.html (we don't use it) or the file names in dist to get the hash?

divyang-joshi avatar Jan 30 '17 19:01 divyang-joshi

A script with a regex would be the best way. We use it in tests, see https://github.com/angular/angular-cli/blob/master/tests/e2e/tests/build/rebuild.ts for an example.

filipesilva avatar Feb 03 '17 16:02 filipesilva

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.