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"
|
||||
}
|
||||
],
|
||||
"scripts": [],
|
||||
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"fast": {
|
||||
"optimization": false
|
||||
},
|
||||
"next": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
|
@ -111,6 +113,9 @@
|
|||
"browserTarget": "site:build"
|
||||
},
|
||||
"configurations": {
|
||||
"fast": {
|
||||
"browserTarget": "site:build:fast"
|
||||
},
|
||||
"next": {
|
||||
"browserTarget": "site:build:next"
|
||||
},
|
||||
|
@ -232,4 +237,4 @@
|
|||
"prefix": "aio"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"aio-use-npm": "node tools/ng-packages-installer restore .",
|
||||
"aio-check-local": "node tools/ng-packages-installer check .",
|
||||
"ng": "yarn check-env && ng",
|
||||
"start": "yarn check-env && ng serve",
|
||||
"start": "yarn check-env && ng serve --configuration=fast",
|
||||
"build": "yarn build-for stable",
|
||||
"prebuild-for": "yarn setup",
|
||||
"build-for": "yarn ~~build --configuration",
|
||||
|
|
Loading…
Reference in New Issue