Skip to content

Commit c4c299b

Browse files
committed
fix(@angular-devkit/build-angular): silence xhr2 not ESM module warning
This is used inernally by '@angular/platform-server' and is in a seperate chunk that is unused when using `provideHttpClient(withFetch())`. (cherry picked from commit 6067f85)
1 parent 6224b05 commit c4c299b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/angular_devkit/build_angular/src/tools/esbuild/commonjs-checker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ export function checkCommonJSModules(
4141
// Once the build output is updated to be fully ESM, this can be removed.
4242
allowedRequests.add('zone.js');
4343

44+
// Used by '@angular/platform-server' and is in a seperate chunk that is unused when
45+
// using `provideHttpClient(withFetch())`.
46+
allowedRequests.add('xhr2');
47+
4448
// Find all entry points that contain code (JS/TS)
4549
const files: string[] = [];
4650
for (const { entryPoint } of Object.values(metafile.outputs)) {

0 commit comments

Comments
 (0)