Closed
Description
🐞 Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present was: Angular 11 (per original bug report, I did not test this)
Description
Reopening #22602
If I understand correctly, per https://github.com/angular/angular-cli/blob/master/CHANGELOG.md#1322-2022-02-02, this should be fixed in 13.2.2 and higher (since the main PR [#22612] associated with ff54b49e7 closed #22602 ) . However, I see the issue in 13.2.2, 13.3.0, and 14.0.0-next.6.
🔬 Minimal Reproduction
(copied from original bug, except for updated clone link to a fork with 13.3.0)
- Clone https://github.com/JoshuaEN/angular-filename-hashing-bug-reproduction
- Run
npm ci
to install dependencies. - Run
ng build --configuration=production
(with the default es2017 target in tsconfig.json). - Observe the contents of the output
dist/angular-filename-hashing-bug-reproduction/scripts.{revhash_1}.js
file to betry{console.log()}catch(c){}
. - Change the
compilerOptions.target
toes2019
(ores2020
ores2021
) fromes2017
in tsconfig.json. - Run
ng build --configuration=production
. - Observe the contents of the output
dist/angular-filename-hashing-bug-reproduction/scripts.{revhash_2}.js
file to betry{console.log()}catch{}
(different from the output from step 4). - Observe that revhash_1 equals revhash_2.
🌍 Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 13.3.0
Node: 16.14.2
Package Manager: npm 8.5.0
OS: win32 x64
Angular: 13.3.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.0
@angular-devkit/build-angular 13.3.0
@angular-devkit/core 13.3.0
@angular-devkit/schematics 13.3.0
@schematics/angular 13.3.0
rxjs 7.4.0
typescript 4.5.5