angular/packages/bazel/test/ng_package
Paul Gschwendtner 4fa5d18e5a feat(bazel): support bundling .d.ts with code splitting (#60321)
Instead of relying on Microsoft's API extractor for `d.ts` bundling,
we are switching to Rollup-based `.d.ts` bundling.

This allows us to support code spliting, even for `.d.ts` files,
allowing for relative imports to be used between entry-points, without
ending up duplicating `.d.ts` definitions in two files. This would otherwise cause
problems with assignability of types.

It also nicely integrates into our existing rollup configuration, and
overall simplifies the `ng_package` rule even further!

Notably `tsup` also uses this rollup plugin, and it seems to work well.
Keep in mind that Microsoft's API extractor is pretty hard to integrate,
caused many problems in the past, and isn't capable of code splitting.
This aligns our d.ts bundling with the .mjs bundling (great alignment).

PR Close #60321
2025-03-11 13:03:08 -07:00
..
example refactor(bazel): remove primary_bundle_name as attr for ng_package (#60306) 2025-03-10 09:31:20 -07:00
example-with-ts-library refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
BUILD.bazel fix(bazel): do not error if files part of srcs are outside of package (#45622) 2022-04-14 14:58:27 -07:00
common_package.spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
core_package.spec.ts feat(bazel): support bundling .d.ts with code splitting (#60321) 2025-03-11 13:03:08 -07:00
example_package.golden feat(bazel): support bundling .d.ts with code splitting (#60321) 2025-03-11 13:03:08 -07:00
example_package.spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
example_with_ts_library_package.golden feat(bazel): support bundling .d.ts with code splitting (#60321) 2025-03-11 13:03:08 -07:00
outside_package.txt fix(bazel): do not error if files part of srcs are outside of package (#45622) 2022-04-14 14:58:27 -07:00
test_utils.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00