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

feat(vite): allow user to set their custom target for transform #13691

Merged
merged 1 commit into from Dec 16, 2022

Conversation

mandarini
Copy link
Member

@mandarini mandarini commented Dec 7, 2022

If a project has more than one build or serve (or even test) target, the @nrwl/vite:configuration generator will convert the first one it finds. We can allow the user to manually specify, if they want, which target they want to change.

This could be a niche use case, since most probably the new setup (folder/file structure) will just work for vite, but we cannot really assume, and also someone could want to use multiple custom executors, too. I think it's fair to allow the user to specify the target they want to convert.

The PR also improves a bit the process of converting, by introducing some errors and interractivity, in case the project Nx is trying to convert does not have any executors we recognize, for example.

@vercel
Copy link

vercel bot commented Dec 7, 2022

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

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Dec 16, 2022 at 1:14PM (UTC)

@mandarini mandarini self-assigned this Dec 7, 2022
@mandarini mandarini changed the title Fix/vite custom target name feat(vite): allow user to set their custom target for transform Dec 7, 2022
@mandarini mandarini force-pushed the fix/vite-custom-target-name branch 2 times, most recently from 04edc92 to 9b4fd95 Compare December 15, 2022 12:41
@mandarini mandarini force-pushed the fix/vite-custom-target-name branch 2 times, most recently from 488ba75 to 2c658d6 Compare December 15, 2022 13:16
@mandarini mandarini marked this pull request as ready for review December 15, 2022 17:20
Copy link
Member

@jaysoo jaysoo left a comment

Choose a reason for hiding this comment

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

Added some comments.

There is also the enquirer package that needs to be added to @nrwl/vite/package.json.

packages/vite/src/utils/generator-utils.ts Outdated Show resolved Hide resolved
packages/vite/src/utils/generator-utils.ts Outdated Show resolved Hide resolved
packages/vite/src/utils/generator-util.spec.ts Outdated Show resolved Hide resolved
packages/vite/src/utils/generator-utils.ts Outdated Show resolved Hide resolved
@github-actions
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 Mar 16, 2023
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

2 participants