Skip to content

Commit 59837f4

Browse files
AndrewKushniralxhub
authored andcommitted
refactor(platform-server): import xhr2 dynamically in the ServerXhr class (#50095)
This commit updates the `@angular/common/http` and `@angular/platform-server` packages to allow dynamic import of the `xhr2` dependency. The `xhr2` dependency has side-effects that rely on a global scope and as a result in some environments those side-effectful calls fail. With the changes from this PR, the import is delayed until it's actually needed, which gives a chance for the underlying platform to setup global scope (via shims) as needed. Co-authored-by: alan-agius4 <[email protected]> PR Close #50095
1 parent 73fcf9f commit 59837f4

File tree

4 files changed

+317
-282
lines changed

4 files changed

+317
-282
lines changed

integration/platform-server/angular.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
"outputHashing": "media"
117117
},
118118
"development": {
119+
"buildOptimizer": false,
119120
"optimization": false,
120121
"sourceMap": true,
121122
"extractLicenses": false,
@@ -239,6 +240,7 @@
239240
"outputHashing": "media"
240241
},
241242
"development": {
243+
"buildOptimizer": false,
242244
"optimization": false,
243245
"sourceMap": true,
244246
"extractLicenses": false,

0 commit comments

Comments
 (0)