Skip to content

Commit 9c645ec

Browse files
committed
refactor(@angular/build): use import resolution-mode for rolldown-plugin-dts types
Use `{ with: { 'resolution-mode': 'import' } }` on the dynamic import type assertion for `rolldown-plugin-dts` and remove the custom ambient module declaration file (`types.d.ts`).
1 parent 4951994 commit 9c645ec

2 files changed

Lines changed: 4 additions & 55 deletions

File tree

‎packages/angular/build/src/builders/library/pipeline/bundler.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,10 @@ async function bundleAllDts(
439439
// Ensure Rolldown's native binding is initialized via `loadRolldown()` before evaluating
440440
// `rolldown-plugin-dts`, which has top-level imports of `rolldown/experimental`.
441441
await loadRolldown();
442-
const { dts } = await import('rolldown-plugin-dts');
442+
const { dts } = (await import('rolldown-plugin-dts' as string)) as typeof import(
443+
'rolldown-plugin-dts',
444+
{ with: { 'resolution-mode': 'import' } }
445+
);
443446

444447
const dtsSourcemap = !!options.declarationMap;
445448
// Filter out `rolldown-plugin-dts:resolver` because all `.d.ts` files are already emitted

‎packages/angular/build/src/builders/library/pipeline/types.d.ts‎

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)