We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33c866f commit e885819Copy full SHA for e885819
packages/ngtools/webpack/src/ivy/loader.ts
@@ -6,6 +6,7 @@
6
* found in the LICENSE file at https://angular.dev/license
7
*/
8
9
+import * as fs from 'node:fs';
10
import * as path from 'node:path';
11
import type { LoaderContext } from 'webpack';
12
import { AngularPluginSymbol, FileEmitterCollection } from './symbol';
@@ -72,6 +73,10 @@ export function angularWebpackLoader(
72
73
);
74
}
75
76
+ // Write the declaration file in the target dir
77
+ if (result.declaration) {
78
+ fs.writeFileSync(this.resourcePath.replace('.ts', '.d.ts'), result.declaration);
79
+ }
80
callback(undefined, resultContent, resultMap);
81
})
82
.catch((err) => {
0 commit comments