- Notifications
You must be signed in to change notification settings - Fork11.9k
refactor(@angular/cli): provide default serve target for applications#28011
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
clydin wants to merge3 commits intoangular:mainChoose a base branch fromclydin:cli/default-workspace-targets
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
b63e0df
to7701ee6
Comparezygarios commentedNov 19, 2024
What about this PR? It's cool, and i hope it will be released with 19 :( |
The `serve` command will now use a default project target and buildername if the target entry is not explicitly defined. This allows the removalof additional configuration from an `angular.json` file. If the target isalready present than it will take priority over any default builder behavior.The default logic will use the appropriate development server builder forofficially supported packages (`@angular/build`/`@angular-devkit/build-angular`).The `dev-server` builder from these packages will currently assume a `development`configuration is present within the `build` target. The default behavior maybe expanded in the future to support more arbitrary `build` target configurations.If there is third-party package usage within the `build` target, the CLIwill attempt to discover a `dev-server` builder within the same package usedby the `build` target. If none is found, no default will be added and the`serve` command will issue an error when no explicit target is present.
…on to be optionalThe development server (`dev-server`) within `@angular/build` no longerrequires a `buildTarget` option to be specified. If not present, the valuewill default to the current project's 'build' target. The configuration usedfor the build target will be the same as the development server configurationif specified or, if not specified, it will default to `development`.
…ildTarget` option to be optionalThe development server (`dev-server`) within `@angular-devkit/build-angular` no longerrequires a `buildTarget` option to be specified. If not present, the valuewill default to the current project's 'build' target. The configuration usedfor the build target will be the same as the development server configurationif specified or, if not specified, it will default to `development`.
c677e26
to7c48870
CompareSign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
area: @angular/buildarea: @angular/cliarea: @angular-devkit/build-angulartarget: minorThis PR is targeted for the next minor release
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
serve
command will now use a default project target and builder name if the target entry is not explicitly defined. This allows the removal of additional configuration from anangular.json
file. If the target is already present than it will take priority over any default builder behavior. The default logic will use the appropriate development server builder for officially supported packages (@angular/build
/@angular-devkit/build-angular
). Thedev-server
builder from these packages will currently assume adevelopment
configuration is present within thebuild
target. The default behavior may be expanded in the future to support more arbitrarybuild
target configurations. If there is third-party package usage within thebuild
target, the CLI will attempt to discover adev-server
builder within the same package used by thebuild
target. If none is found, no default will be added and theserve
command will issue an error when no explicit target is present.