mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The linker inserts the constant statements that are needed to support compiled templates after the import statements of an ESM file, but it failed to account for import statements that are not at the top of the file. This is typically seen in FESM files where multiple individual ESMs have been concatenated into a single ESM file, with imports in various places. The linker would then find the very last import statement to insert the constant statements after, but this may result in TDZ errors for component templates that have been emitted earlier in the file. This commit updates the Babel linker plugin to insert constant statements after the last import of the first import group, therefore avoiding the TDZ error. Fixes #56403 PR Close #56431 |
||
|---|---|---|
| .. | ||
| ast | ||
| babel_declaration_scope_spec.ts | ||
| babel_plugin_spec.ts | ||
| BUILD.bazel | ||
| es2015_linker_plugin_spec.ts | ||