mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 <17563226+alan-agius4@users.noreply.github.com> PR Close #50095
258 lines
7.8 KiB
JSON
258 lines
7.8 KiB
JSON
{
|
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
"version": 1,
|
|
"newProjectRoot": "projects",
|
|
"projects": {
|
|
"ngmodule": {
|
|
"projectType": "application",
|
|
"schematics": {},
|
|
"root": "projects/ngmodule",
|
|
"sourceRoot": "projects/ngmodule/src",
|
|
"prefix": "app",
|
|
"architect": {
|
|
"build": {
|
|
"builder": "@angular-devkit/build-angular:browser",
|
|
"options": {
|
|
"outputPath": "dist/ngmodule/browser",
|
|
"index": "projects/ngmodule/src/index.html",
|
|
"main": "projects/ngmodule/src/main.ts",
|
|
"progress": false,
|
|
"polyfills": [
|
|
"zone.js"
|
|
],
|
|
"tsConfig": "projects/ngmodule/tsconfig.app.json",
|
|
"assets": [
|
|
"projects/ngmodule/src/favicon.ico",
|
|
"projects/ngmodule/src/assets"
|
|
],
|
|
"styles": [
|
|
"projects/ngmodule/src/styles.css"
|
|
],
|
|
"scripts": []
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"budgets": [
|
|
{
|
|
"type": "initial",
|
|
"maximumWarning": "500kb",
|
|
"maximumError": "1mb"
|
|
},
|
|
{
|
|
"type": "anyComponentStyle",
|
|
"maximumWarning": "2kb",
|
|
"maximumError": "4kb"
|
|
}
|
|
],
|
|
"outputHashing": "all"
|
|
},
|
|
"development": {
|
|
"buildOptimizer": false,
|
|
"optimization": false,
|
|
"vendorChunk": true,
|
|
"extractLicenses": false,
|
|
"sourceMap": true,
|
|
"namedChunks": true
|
|
}
|
|
},
|
|
"defaultConfiguration": "production"
|
|
},
|
|
"serve": {
|
|
"builder": "@angular-devkit/build-angular:dev-server",
|
|
"configurations": {
|
|
"production": {
|
|
"browserTarget": "ngmodule:build:production"
|
|
},
|
|
"development": {
|
|
"browserTarget": "ngmodule:build:development"
|
|
}
|
|
},
|
|
"defaultConfiguration": "development"
|
|
},
|
|
"e2e": {
|
|
"builder": "@angular-devkit/build-angular:protractor",
|
|
"options": {
|
|
"port": 0,
|
|
"protractorConfig": "e2e/protractor.conf.js",
|
|
"webdriverUpdate": false,
|
|
"baseUrl": "http://localhost:4206"
|
|
}
|
|
},
|
|
"extract-i18n": {
|
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
"options": {
|
|
"browserTarget": "ngmodule:build"
|
|
}
|
|
},
|
|
"test": {
|
|
"builder": "@angular-devkit/build-angular:karma",
|
|
"options": {
|
|
"progress": false,
|
|
"polyfills": [
|
|
"zone.js",
|
|
"zone.js/testing"
|
|
],
|
|
"tsConfig": "projects/ngmodule/tsconfig.spec.json",
|
|
"assets": [
|
|
"projects/ngmodule/src/favicon.ico",
|
|
"projects/ngmodule/src/assets"
|
|
],
|
|
"styles": [
|
|
"projects/ngmodule/src/styles.css"
|
|
],
|
|
"scripts": []
|
|
}
|
|
},
|
|
"server": {
|
|
"builder": "@angular-devkit/build-angular:server",
|
|
"options": {
|
|
"progress": false,
|
|
"outputPath": "dist/ngmodule/server",
|
|
"main": "projects/ngmodule/server.ts",
|
|
"tsConfig": "projects/ngmodule/tsconfig.server.json"
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"outputHashing": "media"
|
|
},
|
|
"development": {
|
|
"buildOptimizer": false,
|
|
"optimization": false,
|
|
"sourceMap": true,
|
|
"extractLicenses": false,
|
|
"vendorChunk": true
|
|
}
|
|
},
|
|
"defaultConfiguration": "production"
|
|
}
|
|
}
|
|
},
|
|
"standalone": {
|
|
"projectType": "application",
|
|
"schematics": {},
|
|
"root": "projects/standalone",
|
|
"sourceRoot": "projects/standalone/src",
|
|
"prefix": "app",
|
|
"architect": {
|
|
"build": {
|
|
"builder": "@angular-devkit/build-angular:browser",
|
|
"options": {
|
|
"outputPath": "dist/standalone/browser",
|
|
"index": "projects/standalone/src/index.html",
|
|
"main": "projects/standalone/src/main.ts",
|
|
"polyfills": [
|
|
"zone.js"
|
|
],
|
|
"tsConfig": "projects/standalone/tsconfig.app.json",
|
|
"assets": [
|
|
"projects/standalone/src/favicon.ico",
|
|
"projects/standalone/src/assets"
|
|
],
|
|
"styles": [
|
|
"projects/standalone/src/styles.css"
|
|
],
|
|
"progress": false,
|
|
"scripts": []
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"budgets": [
|
|
{
|
|
"type": "initial",
|
|
"maximumWarning": "500kb",
|
|
"maximumError": "1mb"
|
|
},
|
|
{
|
|
"type": "anyComponentStyle",
|
|
"maximumWarning": "2kb",
|
|
"maximumError": "4kb"
|
|
}
|
|
],
|
|
"outputHashing": "all"
|
|
},
|
|
"development": {
|
|
"buildOptimizer": false,
|
|
"optimization": false,
|
|
"vendorChunk": true,
|
|
"extractLicenses": false,
|
|
"sourceMap": true,
|
|
"namedChunks": true
|
|
}
|
|
},
|
|
"defaultConfiguration": "production"
|
|
},
|
|
"serve": {
|
|
"builder": "@angular-devkit/build-angular:dev-server",
|
|
"configurations": {
|
|
"production": {
|
|
"browserTarget": "standalone:build:production"
|
|
},
|
|
"development": {
|
|
"browserTarget": "standalone:build:development"
|
|
}
|
|
},
|
|
"defaultConfiguration": "development"
|
|
},
|
|
"e2e": {
|
|
"builder": "@angular-devkit/build-angular:protractor",
|
|
"options": {
|
|
"port": 0,
|
|
"protractorConfig": "e2e/protractor.conf.js",
|
|
"webdriverUpdate": false,
|
|
"baseUrl": "http://localhost:4206"
|
|
}
|
|
},
|
|
"extract-i18n": {
|
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
"options": {
|
|
"browserTarget": "standalone:build"
|
|
}
|
|
},
|
|
"test": {
|
|
"builder": "@angular-devkit/build-angular:karma",
|
|
"options": {
|
|
"progress": false,
|
|
"polyfills": [
|
|
"zone.js",
|
|
"zone.js/testing"
|
|
],
|
|
"tsConfig": "projects/standalone/tsconfig.spec.json",
|
|
"assets": [
|
|
"projects/standalone/src/favicon.ico",
|
|
"projects/standalone/src/assets"
|
|
],
|
|
"styles": [
|
|
"projects/standalone/src/styles.css"
|
|
],
|
|
"scripts": []
|
|
}
|
|
},
|
|
"server": {
|
|
"builder": "@angular-devkit/build-angular:server",
|
|
"options": {
|
|
"progress": false,
|
|
"outputPath": "dist/standalone/server",
|
|
"main": "projects/standalone/server.ts",
|
|
"tsConfig": "projects/standalone/tsconfig.server.json"
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"outputHashing": "media"
|
|
},
|
|
"development": {
|
|
"buildOptimizer": false,
|
|
"optimization": false,
|
|
"sourceMap": true,
|
|
"extractLicenses": false,
|
|
"vendorChunk": true
|
|
}
|
|
},
|
|
"defaultConfiguration": "production"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"cli": {
|
|
"analytics": false
|
|
}
|
|
}
|