-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(@schematics/angular): production builds by default #20128
Conversation
@alan-agius4 |
@destus90, yeah indeed, thanks for pointing that out. |
With this change we deprecated the `--prod` command line argument. This argument is confusing especially to new users, since users expect that this builds an application in production mode. This however, is only an alias for `--configuration="production"`
With this change we do several changes to the `angular.json` configuration for `build` , `server` and `app-shell` targets so that these are `production` by default. - build, server and app-shell targets are configured to run production by default. - We add a new configuration named `development` to run the mentioned builder targets in development. Ex: `ng build --configuration development`. - When adding `universal` or `app-shell`, we generate the full set of configurations as per the `buiid` target. Previously, we only generated the `production` configuration. - We added a helper script in `package.json` to run build in watch mode. `npm run watch` which is a shortcut for `ng build --watch --configuration development`
In CLI version 12, we introduced the concept of production builds by default. With this change we update the documentation to reflect the changes. More information about the change can be found angular/angular-cli#20128 PR Close #41173
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
With this change we do several changes to the
angular.json
configuration forbuild
,server
andapp-shell
targets.development
to run the mentioned builder targets in development. Ex:ng build --configuration development
.universal
orapp-shell
, we generate the full set of configurations as per thebuiid
target. Previously, we only generated theproduction
configuration.package.json
to run build in watch mode.npm run watch
which is a shortcut forng build --watch --configuration development
--prod
command line argument. This argument is confusing especially to new users, since users expect that this builds an application in production mode. This however, is only an alias for--configuration="production"
Closes #14471