Skip to content
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

fix(bundling): set project type correct for buildable vite projects #26420

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Jun 6, 2024

This PR:

  1. fixes @nx/vite/plugin so that it infers the correct projectType
  2. changes the default package-json-workspaces plugin such that projectType is not inferred is appsDir and libsDir are not set
  3. Update PDV to look for the normalized type property on projects if projectType is missing (due to no longer being inferred by any plugin).

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

Copy link

vercel bot commented Jun 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jun 13, 2024 7:11pm

@jaysoo jaysoo marked this pull request as ready for review June 6, 2024 15:53
@jaysoo jaysoo requested a review from a team as a code owner June 6, 2024 15:53
@jaysoo jaysoo requested a review from JamesHenry June 6, 2024 15:53
@jaysoo jaysoo force-pushed the fix/NXC-713 branch 3 times, most recently from 7382792 to 3790c0b Compare June 6, 2024 17:43
@jaysoo jaysoo requested a review from a team as a code owner June 6, 2024 17:43
Copy link
Collaborator

@MaxKless MaxKless left a comment

Choose a reason for hiding this comment

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

left two small comments but looks good

directory.startsWith(nxJson.workspaceLayout.libsDir)
) {
projectConfiguration.projectType = 'library';
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

How come there's no third case that handles only appsDir being set?

Copy link
Member Author

Choose a reason for hiding this comment

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

In that case, we just don't set projectType, which was the previous logic. It's either both appsDir and libsDir, or only libsDir. The rest will fall back to project.type rather than project.data.projectType.

Copy link
Collaborator

@FrozenPandaz FrozenPandaz left a comment

Choose a reason for hiding this comment

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

Sorry, there might be a big merge conflict. Should be good once you rebase.

@jaysoo jaysoo merged commit fbd7f80 into master Jun 13, 2024
6 checks passed
@jaysoo jaysoo deleted the fix/NXC-713 branch June 13, 2024 19:48
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants