The default value is changed from `true` to `progress.stdout.isTTY`. It
still has lower priority than value specified by command line flag or in
the .angular-cli.json config.
Fixes#8148
Forcing TypeScript to output commonjs modules instead of es2015 modules drastically improves rebuild speeds, especially for AOT.
This PR forces this option on the following modes:
- `ng build --watch --target=development`
- `ng serve --target=development`
- `ng test --code-coverage=false`
Please note that `--target=development` and `--code-coverage=false` are the defaults.
See https://github.com/webpack/webpack/issues/5863 for the webpack issue.
We feel build `--build-optimizer` is stable enough to not be experimental anymore.
This PR defaults `build-optimizer` when using Angular 5+ on a production build with `--aot`.
It can still be turned off with `--no-build-optimizer` (or `--build-optimizer=false`).
Fix#8050
This flag allows people who know what theyre doing to bundle the
server build together with all dependencies. It should only be
used when the whole rendering process is part of the main.ts
or one of its dependencies.
Fixes#7903.
This adds the new parameter `missingTranslation` for AoT that was added in angular/angular/pull/15987 and that lets you define the MissingTranslationStrategy
Followup to #6881
Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well.
Defaults to true in development, false in production.
Adds the new flag `--build-optimizer` (`--bo`), usable only with `--aot` (or `--prod` since it auto enables `--aot`).
This feature is experimental, and may not work correctly on your project. Should it work, total bundle size should go down. Savings are heavily dependent on the project.
See https://github.com/angular/devkit/tree/master/packages/angular_devkit/build_optimizer for details about all the optimizations applied.
Usage: `ng build --prod --build-optimizer`. Disabling the vendor chunk has been shown to improve total savings, and is done automatically when `--bo` is specified unless `--vendor-chunk` has a value.
Please let us know if using `--build-optimizer` breaks your project so we can improve it further. Repos are very welcome.
Adds following defaults to `.angular-cli.json` under `defaults`: `sourcemaps`, `baseHref`, `progress`, `poll`, `deleteOutputPath`, `preserveSymlinks`, `showCircularDependencies`.
They can be set via `ng set defaults.build.KEY = VALUE`.
Also removes `apps.0.showCircularDependencies`. This is not a breaking chance since it was only added in 1.3.0-beta.0.
Followup to https://github.com/angular/angular-cli/pull/6884#discussion_r125533830.
This is useful when you don't want the server to rebuild in the middle of something.
A good example is when running e2e tests. Especially on larger suites, one would prefer to continue working while the build is tested without compromising tests.
This will break tests on #4744. They should be adjusted to add the `--watch` flag since they depend on the live reload behaviour during `ng e2e`.
Allows you to run ng build --json which generates dist/stats.json. This can then be used with things like the webpack-bundle-analyzer or https://webpack.github.io/analyse/Fix#3179
Uses existing Protractor API to run it directly instead of using `npm run
e2e`.
Also adds support for the following flags: `--serve`, `--config`,
`--specs`, `--element-explorer`, `--webdriver-update`.
Fix#4256Fix#4478
BREAKING CHANGE: `ng e2e` no longer needs `ng serve` to be running.