angular/packages/compiler-cli
Paul Gschwendtner b1d6fad5e3 refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431)
Switches the compiler-cli usage of `__filename` to `import.meta.url`
when ESM bundles are generated. Unfortunately we cannot start using
only `import.meta` yet as we still build and run all code in Angular
in CommonJS module output for devmode tests.

This commit also fixes various instances where a jasmine spy was applied on
a namespace export that will break with ES module (and the interop for
CommonJS output). We fix these spies by using a default import.

PR Close #43431
2021-10-01 18:28:45 +00:00
..
integrationtest refactor(compiler-cli): remove listLazyRoutes operation (#43591) 2021-09-29 14:45:18 -07:00
linker refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
ngcc refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
private refactor: switch packages away from deep cross-package imports (#43431) 2021-10-01 18:28:43 +00:00
src refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
test refactor: remove remaining dynamic require usages in package output (#43431) 2021-10-01 18:28:45 +00:00
BUILD.bazel refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
esbuild.config.js refactor: setup bundling for @angular/compiler-cli package (#43431) 2021-10-01 18:28:42 +00:00
import_meta_url.d.ts refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
index.ts refactor(compiler-cli): expose code needed by Angular CLI (#43431) 2021-10-01 18:28:43 +00:00
package.json refactor(compiler-cli): do not use __filename or __dirname global for ESM compatibility (#43431) 2021-10-01 18:28:45 +00:00
tsconfig-build.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00