build(aio): add support for faster, unoptimized `serve` (#23569)
When running `yarn start` and `yarn serve-and-sync`, we are usually
more interested in faster re-build times than optimized builds. This was
also the behavior, before upgrading to @angular/cli@6 (fc5af69fb
).
This commit introduces a new configuration (`fast`), which is used by
`yarn start` and `yarn serve-and-sync` to restore the faster,
unoptimized builds.
Other commands, such as `ng serve` and `ng e2e`, remain unchanged (using
slower, optimized builds).
PR Close #23569
This commit is contained in:
parent
7ef9d4a582
commit
4cb46ce10c
|
@ -75,10 +75,12 @@
|
||||||
"input": "src/styles.scss"
|
"input": "src/styles.scss"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"scripts": [],
|
"scripts": []
|
||||||
|
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
|
"fast": {
|
||||||
|
"optimization": false
|
||||||
|
},
|
||||||
"next": {
|
"next": {
|
||||||
"fileReplacements": [
|
"fileReplacements": [
|
||||||
{
|
{
|
||||||
|
@ -111,6 +113,9 @@
|
||||||
"browserTarget": "site:build"
|
"browserTarget": "site:build"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
|
"fast": {
|
||||||
|
"browserTarget": "site:build:fast"
|
||||||
|
},
|
||||||
"next": {
|
"next": {
|
||||||
"browserTarget": "site:build:next"
|
"browserTarget": "site:build:next"
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"aio-use-npm": "node tools/ng-packages-installer restore .",
|
"aio-use-npm": "node tools/ng-packages-installer restore .",
|
||||||
"aio-check-local": "node tools/ng-packages-installer check .",
|
"aio-check-local": "node tools/ng-packages-installer check .",
|
||||||
"ng": "yarn check-env && ng",
|
"ng": "yarn check-env && ng",
|
||||||
"start": "yarn check-env && ng serve",
|
"start": "yarn check-env && ng serve --configuration=fast",
|
||||||
"build": "yarn build-for stable",
|
"build": "yarn build-for stable",
|
||||||
"prebuild-for": "yarn setup",
|
"prebuild-for": "yarn setup",
|
||||||
"build-for": "yarn ~~build --configuration",
|
"build-for": "yarn ~~build --configuration",
|
||||||
|
|
Loading…
Reference in New Issue