Skip to content

feat(@schematics/angular): generate libraries using TypeScript project references #30148

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 1 commit into from
Apr 23, 2025

Conversation

clydin
Copy link
Member

@clydin clydin commented Apr 22, 2025

When generating a project (via ng generate library), the created TypeScript configuration files (tsconfig.lib.json/tsconfig.spec.json) will be setup as composite projects and added as project references 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, library, etc.) within each project. The Angular build process is otherwise unaffected by these changes.

@clydin clydin added the target: major This PR is targeted for the next major release label Apr 22, 2025
@clydin clydin marked this pull request as ready for review April 22, 2025 17:57
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 22, 2025
@clydin clydin requested a review from alan-agius4 April 22, 2025 17:57
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, just a nit

…t references

When generating a project (via `ng generate library`), the
created TypeScript configuration files (`tsconfig.lib.json`/`tsconfig.spec.json`)
will be setup as composite projects and added as project references 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, library, etc.) within each project.
The Angular build process is otherwise unaffected by these changes.
@clydin clydin force-pushed the library/solution-tsconfigs branch from da47ccf to 03b6901 Compare April 23, 2025 11:01
@clydin clydin added 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 23, 2025
@clydin clydin merged commit 0ab1ddf into angular:main Apr 23, 2025
31 checks passed
@clydin clydin deleted the library/solution-tsconfigs branch April 23, 2025 11:51
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