angular/packages
Paul Gschwendtner 1e06c8e8b6 fix(platform-browser-dynamic): ensure compiler is loaded before @angular/common (#60458)
With the recent changes to the APF bundling rules, we turned on
tree-shaking in rollup to support proper code splitting for FESM bundles.

This resulted in Rollup re-ordering imports in the FESM bundles of
`@angular/platform-browser-dynamic`— highlighting that over the past
years, this package "accidentally" resulted in the side-effects of the
compiler registering itself globally.

This continues to be the case, and our changes generally didn't cause
any issues in CLI applications because the CLI explicitly wires up the
compiler (as expected) before `-dynamic` is even loaded. For custom
setup, like Analog, this order change surfaced a breakage because e.g.
`@angular/common` with its JIT decorators of e.g. directives/services
are triggered before the compiler is actually loaded/made available.

This commit fixes this. The explicit imports in practice are a noop
because our FESM bundling doesn't recognize compiler as side-effects
true; but marking the whole -dynamic package as having side-effects;
prevents rollup from swapping the import order. Long-term, we should
look into improving this by teaching `ng_package` that e.g. the compiler
has side-effects; so that the `import @angular/compiler` statement is
not dropped when constructing FESM bundles.

PR Close #60458
2025-03-19 16:54:49 +01:00
..
animations docs: fix all brokens links on the API pages (#59162) 2025-03-04 20:07:24 +00:00
bazel feat(bazel): support bundling .d.ts with code splitting (#60321) (#60332) 2025-03-11 15:33:05 -07:00
benchpress fix(benchpress): Ensure future-proof correct initialization order (#60025) 2025-02-20 11:21:55 -05:00
common refactor(http): replace overriden method with a ts declare (#60278) 2025-03-12 12:27:48 -07:00
compiler refactor: remove peer dependency on core from compiler (#60437) 2025-03-18 18:15:08 +01:00
compiler-cli build: improve partial compliance golden generation and add debug logging (#60427) 2025-03-18 07:10:43 +00:00
core fix(core): catch hydration marker with implicit body tag (#60429) 2025-03-19 15:51:37 +01:00
docs/di docs: remove outdated/unsupported webworker doc (#49856) 2023-04-17 14:01:41 +00:00
elements refactor(core): extract dirty and markForRefresh from the private ViewRef. (#59122) 2025-03-04 22:05:41 +00:00
examples refactor(core): Remove the optional flag from Injector and all casts. (#60154) 2025-03-05 13:44:00 -08:00
forms docs: Correct comments for FormControl (#58352) 2025-03-06 10:36:47 -08:00
language-service feat(bazel): support bundling .d.ts with code splitting (#60321) (#60332) 2025-03-11 15:33:05 -07:00
localize feat(bazel): support bundling .d.ts with code splitting (#60321) (#60332) 2025-03-11 15:33:05 -07:00
misc/angular-in-memory-web-api docs: fix spelling of "set up" (#58362) 2025-02-03 13:50:49 -08:00
platform-browser docs: update provideClientHydration parameter description (#60432) 2025-03-18 18:11:48 +01:00
platform-browser-dynamic fix(platform-browser-dynamic): ensure compiler is loaded before @angular/common (#60458) 2025-03-19 16:54:49 +01:00
platform-server refactor(platform-server): expose internal render method for extensibility (#60416) 2025-03-18 10:31:44 +01:00
private/testing docs: set syntax highlighting of code examples MD code blocks (#59026) 2024-12-04 17:30:28 +01:00
router refactor(router): Clean up the transition subject (#60357) 2025-03-14 11:16:15 +01:00
service-worker docs: fix all brokens links on the API pages (#59162) 2025-03-04 20:07:24 +00:00
ssr refactor(core): add REQUEST, RESPONSE_INIT and REQUEST_CONTEXT tokens (#58669) 2024-11-14 14:21:21 -08:00
upgrade fix(upgrade): handle output emitters when downgrading a component (#60369) 2025-03-13 17:36:56 +01:00
zone.js docs(zone.js): update NON-STANDARD-APIS.md (#58098) 2025-03-05 17:30:43 +00:00
BUILD.bazel docs(core): remove redundant reference-manifests handwritten entries (#59169) 2024-12-12 17:29:22 -08:00
circular-deps-test.conf.js build: remove circular deps goldens (#60021) 2025-02-19 21:01:32 +00:00
empty.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
goog.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
license-banner.txt docs: update license year (#59883) 2025-03-04 19:36:48 +00:00
README.md docs: fix links to docs (#57391) 2024-08-19 09:20:15 -07:00
system.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
tsconfig-build.json build: remove usages of useDefineForClassFields: false (#58297) 2024-10-28 12:26:05 -07:00
tsconfig-legacy-saucelabs.json feat(core): support TypeScript 5.5 (#56096) 2024-05-29 15:33:33 +02:00
tsconfig-test.json
tsconfig-tsec-base.json refactor(core): throw an error when hydration marker is missing from DOM (#51170) 2023-08-04 11:31:49 -04:00
tsconfig.json feat(language-service): add code reactoring action to migrate @Input to signal-input (#57214) 2024-08-29 07:50:41 -07:00
tsec-exemption.json
types.d.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT