Skip to content

Commit

Permalink
build(aio): add support for faster, unoptimized serve (#23569)
Browse files Browse the repository at this point in the history
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 (fc5af69).

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
  • Loading branch information
gkalpak authored and IgorMinar committed Apr 27, 2018
1 parent 098a3ef commit 08e9290
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions aio/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@
"input": "src/styles.scss"
}
],
"scripts": [],

"scripts": []
},
"configurations": {
"fast": {
"optimization": false
},
"next": {
"fileReplacements": [
{
Expand Down Expand Up @@ -111,6 +113,9 @@
"browserTarget": "site:build"
},
"configurations": {
"fast": {
"browserTarget": "site:build:fast"
},
"next": {
"browserTarget": "site:build:next"
},
Expand Down Expand Up @@ -232,4 +237,4 @@
"prefix": "aio"
}
}
}
}
2 changes: 1 addition & 1 deletion aio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 08e9290

Please sign in to comment.