Skip to content

feat(@schematics/angular): generate applications using TypeScript project references #30074

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

Merged
merged 2 commits into from
Apr 16, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 9, 2025

When generating a project (either via ng new or ng generate application), the created TypeScript configuration files (tsconfig.app.json/tsconfig.spec.json) will be setup as composite projects and added as project references to in the root tsconfig.json. This transforms the root tsconfig.json into a "solution" style configuration. This allows IDEs to more accurately discover and provide type information for the varying types of files (test, application, etc.) within each project. The Angular build process is otherwise unaffected by these changes.

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @schematics/angular labels Apr 9, 2025
@clydin clydin force-pushed the application/solution-tsconfigs branch 6 times, most recently from 8140140 to 336ce59 Compare April 9, 2025 23:51
…ject references

When generating a project (either via `ng new` or `ng generate application`), the
created TypeScript configuration files (`tsconfig.app.json`/`tsconfig.spec.json`)
will be setup as composite projects and added as project references to in the root
`tsconfig.json`.  This transforms the root `tsconfig.json` into a "solution" style
configuration. This allows IDEs to more accurately discover and provide type information
for the varying types of files (test, application, etc.) within each project.
The Angular build process is otherwise unaffected by these changes.
@clydin clydin force-pushed the application/solution-tsconfigs branch 2 times, most recently from dd6e469 to eac1584 Compare April 11, 2025 16:56
@clydin clydin removed the state: WIP label Apr 12, 2025
@clydin clydin marked this pull request as ready for review April 15, 2025 17:57
…R/Server generation

The `files` field within the `tsconfig.app.json` file is no longer used
with the "solution" style tsconfig generated with applications. The SSR
and server schematics no longer need to modify this field since all TS
files within `src` are included by default.
@clydin clydin force-pushed the application/solution-tsconfigs branch from eac1584 to 937287a Compare April 15, 2025 18:09
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 15, 2025
@clydin clydin requested a review from alan-agius4 April 15, 2025 18:09
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we should do the same for the library schematic :)

@alan-agius4 alan-agius4 added target: major This PR is targeted for the next major release action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 16, 2025
@clydin clydin merged commit be6f13e into angular:main Apr 16, 2025
33 checks passed
@clydin clydin deleted the application/solution-tsconfigs branch April 16, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @schematics/angular detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants