Skip to content

Commit 814e761

Browse files
committed
- Collected .d.ts content
1 parent 1e7d877 commit 814e761

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

packages/ngtools/webpack/src/ivy/plugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,13 +681,16 @@ export class AngularWebpackPlugin {
681681

682682
let content: string | undefined;
683683
let map: string | undefined;
684+
let declaration: string | undefined;
684685
program.emit(
685686
sourceFile,
686687
(filename, data) => {
687688
if (filename.endsWith('.map')) {
688689
map = data;
689690
} else if (filename.endsWith('.js')) {
690691
content = data;
692+
} else if (filename.endsWith('.d.ts')) {
693+
declaration = data;
691694
}
692695
},
693696
undefined,
@@ -705,7 +708,7 @@ export class AngularWebpackPlugin {
705708
...getExtraDependencies(sourceFile),
706709
].map(externalizePath);
707710

708-
return { content, map, dependencies, hash };
711+
return { content, map, declaration, dependencies, hash };
709712
};
710713
}
711714

packages/ngtools/webpack/src/ivy/symbol.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const AngularPluginSymbol: unique symbol = Symbol.for('@ngtools/webpack[a
1111
export interface EmitFileResult {
1212
content?: string;
1313
map?: string;
14+
declaration?: string;
1415
dependencies: readonly string[];
1516
hash?: Uint8Array;
1617
}

0 commit comments

Comments
 (0)