angular/packages/compiler-cli
Alex Rickabaugh 8155428ba6 perf(compiler-cli): ignore the module.id anti-pattern for NgModule ids (#45024)
In early versions of Angular, it was sometimes necessary to provide a
`moduleId` to `@Component` metadata, and the common pattern for doing this
was to set `moduleId: module.id`. This relied on the bundler to fill in a
value for `module.id`.

However, due to the superficial similarity between `Component.moduleId` and
`NgModule.id`, many users ended up setting `id: module.id` in their
NgModules. This is an anti-pattern that has a few negative effects,
including preventing the NgModule from tree-shaking properly.

This commit changes the compiler to ignore `id: module.id` in NgModules, and
instead provide a warning which suggests removing the line entirely.

PR Close #45024
2022-03-22 11:11:54 -07:00
..
integrationtest refactor(core): drop all .ngfactory and .ngsummary imports (#44957) 2022-02-07 15:31:49 -08:00
linker refactor(compiler-cli): linker honors associated statements for a field (#45024) 2022-03-22 11:11:53 -07:00
ngcc feat(core): drop support for Node.js 12 (#45286) 2022-03-08 12:05:03 -08:00
private refactor(localize): update version of Babel (#44931) 2022-02-24 21:42:54 +00:00
src perf(compiler-cli): ignore the module.id anti-pattern for NgModule ids (#45024) 2022-03-22 11:11:54 -07:00
test perf(compiler-cli): ignore the module.id anti-pattern for NgModule ids (#45024) 2022-03-22 11:11:54 -07:00
BUILD.bazel refactor(compiler-cli): remove unused canonical-path dependency (#44918) 2022-01-31 21:39:53 +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 build: switch all instances from ng_rollup_bundle to app_bundle (#44490) 2022-01-04 12:14:14 -08:00
package.json feat(core): drop support for Node.js 12 (#45286) 2022-03-08 12:05:03 -08:00
tsconfig-build.json refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) 2021-12-01 10:36:30 -08:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00