Skip to content

Commit 4d515bb

Browse files
committed
fix(@angular-devkit/build-angular): add required modules as externals imports
Prior to this change any module which was used using `require` was not listed as an external. Closes angular#26833
1 parent eadd898 commit 4d515bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/angular_devkit/build_angular/src/tools/esbuild/bundler-context.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ export class BundlerContext {
331331
for (const importData of imports) {
332332
if (
333333
!importData.external ||
334-
(importData.kind !== 'import-statement' && importData.kind !== 'dynamic-import')
334+
(importData.kind !== 'import-statement' &&
335+
importData.kind !== 'dynamic-import' &&
336+
importData.kind !== 'require-call')
335337
) {
336338
continue;
337339
}

0 commit comments

Comments
 (0)