mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-26 08:13:34 +08:00

Issue number: N/A --------- <!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> When adding the Angular 16 test infrastructure, I accidentally regressed ng14/ng15 test apps to run in production mode when serving locally. This resulted in slower serve time and the vendor code being code split, making it difficult to debug locally. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Angular test apps run in dev mode when served locally - Angular test apps run in prod mode when built with `npm run build` ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> We can share the same `angular.json` across all the major versions of Angular we currently support.
157 lines
4.6 KiB
JSON
157 lines
4.6 KiB
JSON
{
|
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
"version": 1,
|
|
"newProjectRoot": "projects",
|
|
"projects": {
|
|
"test-app": {
|
|
"root": "",
|
|
"sourceRoot": "src",
|
|
"projectType": "application",
|
|
"prefix": "app",
|
|
"schematics": {},
|
|
"architect": {
|
|
"build": {
|
|
"builder": "@angular-devkit/build-angular:browser",
|
|
"options": {
|
|
"outputPath": "dist/test-app/browser",
|
|
"index": "src/index.html",
|
|
"main": "src/main.ts",
|
|
"polyfills": "src/polyfills.ts",
|
|
"tsConfig": "tsconfig.app.json",
|
|
"buildOptimizer": true,
|
|
"assets": [
|
|
"src/favicon.ico",
|
|
{
|
|
"glob": "**/*",
|
|
"input": "src/assets",
|
|
"output": "assets"
|
|
},
|
|
{
|
|
"glob": "**/*.svg",
|
|
"input": "node_modules/ionicons/dist/ionicons/svg",
|
|
"output": "./svg"
|
|
}
|
|
],
|
|
"styles": ["src/styles.css"],
|
|
"scripts": []
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"fileReplacements": [
|
|
{
|
|
"replace": "src/environments/environment.ts",
|
|
"with": "src/environments/environment.prod.ts"
|
|
}
|
|
],
|
|
"optimization": true,
|
|
"outputHashing": "all",
|
|
"sourceMap": false,
|
|
"namedChunks": false,
|
|
"aot": true,
|
|
"progress": false,
|
|
"extractLicenses": true,
|
|
"vendorChunk": false,
|
|
"buildOptimizer": true,
|
|
"budgets": [
|
|
{
|
|
"type": "initial",
|
|
"maximumWarning": "2mb",
|
|
"maximumError": "5mb"
|
|
},
|
|
{
|
|
"type": "anyComponentStyle",
|
|
"maximumWarning": "6kb"
|
|
}
|
|
]
|
|
},
|
|
"development": {
|
|
"buildOptimizer": false,
|
|
"optimization": false,
|
|
"vendorChunk": true,
|
|
"extractLicenses": false,
|
|
"sourceMap": true,
|
|
"namedChunks": true
|
|
}
|
|
},
|
|
"defaultConfiguration": "production"
|
|
},
|
|
"serve": {
|
|
"builder": "@angular-devkit/build-angular:dev-server",
|
|
"options": {
|
|
"browserTarget": "test-app:build"
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"browserTarget": "test-app:build:production"
|
|
},
|
|
"development": {
|
|
"browserTarget": "test-app:build:development"
|
|
}
|
|
},
|
|
"defaultConfiguration": "development"
|
|
},
|
|
"extract-i18n": {
|
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
"options": {
|
|
"browserTarget": "test-app:build"
|
|
}
|
|
},
|
|
"lint": {
|
|
"builder": "@angular-eslint/builder:lint",
|
|
"options": {
|
|
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
|
|
}
|
|
},
|
|
"server": {
|
|
"builder": "@angular-devkit/build-angular:server",
|
|
"options": {
|
|
"outputPath": "dist/test-app/server",
|
|
"main": "server.ts",
|
|
"tsConfig": "tsconfig.server.json"
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"outputHashing": "media",
|
|
"fileReplacements": [
|
|
{
|
|
"replace": "src/environments/environment.ts",
|
|
"with": "src/environments/environment.prod.ts"
|
|
}
|
|
],
|
|
"sourceMap": false,
|
|
"optimization": true
|
|
}
|
|
}
|
|
},
|
|
"serve-ssr": {
|
|
"builder": "@nguniversal/builders:ssr-dev-server",
|
|
"options": {
|
|
"browserTarget": "test-app:build",
|
|
"serverTarget": "test-app:server"
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"browserTarget": "test-app:build:production",
|
|
"serverTarget": "test-app:server:production"
|
|
}
|
|
}
|
|
},
|
|
"prerender": {
|
|
"builder": "@nguniversal/builders:prerender",
|
|
"options": {
|
|
"browserTarget": "test-app:build:production",
|
|
"serverTarget": "test-app:server:production",
|
|
"routes": []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"cli": {
|
|
"schematicCollections": ["@angular-eslint/schematics"],
|
|
"cache": {
|
|
"enabled": false
|
|
}
|
|
}
|
|
}
|