-
Notifications
You must be signed in to change notification settings - Fork 11.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
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
@clydin
clydin
added
the
target: minor
This PR is targeted for the next minor release
label
Jul 9, 2024
@clydin
clydin
force-pushed
the
cli/default-workspace-targets
branch
from
July 9, 2024 17:06
b63e0df
to
7701ee6
Compare
zygarios
commented
Nov 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 builder name if the target entry is not explicitly defined. This allows the removal of additional configuration from an `angular.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`). The `dev-server` builder from these packages will currently assume a `development` configuration is present within the `build` target. The default behavior may be expanded in the future to support more arbitrary `build` target configurations. If there is third-party package usage within the `build` target, the CLI will attempt to discover a `dev-server` builder within the same package used by 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 optional The development server (`dev-server`) within `@angular/build` no longer requires a `buildTarget` option to be specified. If not present, the value will default to the current project's 'build' target. The configuration used for the build target will be the same as the development server configuration if specified or, if not specified, it will default to `development`.
...ildTarget` option to be optional The development server (`dev-server`) within `@angular-devkit/build-angular` no longer requires a `buildTarget` option to be specified. If not present, the value will default to the current project's 'build' target. The configuration used for the build target will be the same as the development server configuration if specified or, if not specified, it will default to `development`.
@clydin
clydin
force-pushed
the
cli/default-workspace-targets
branch
from
March 19, 2025 23:53
c677e26
to
7c48870
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.