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

Remove bunx --bun from Vite guide #6358

Closed
wants to merge 1 commit into from

Conversation

jonkoops
Copy link

@jonkoops jonkoops commented Oct 7, 2023

The Vite guide references running Vite commands using bunx --bun vite. This should no longer be required since Bun 1.0 (according to documentation on the same page), so we can fall back to bun run instead.

What does this PR do?

This replaces the instructions for running Vite with bunx --bun with 'regular' bun run commands.

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

The Vite guide references running Vite commands using `bunx --bun vite`. This is no longer required since Bun 1.0, so we can fall back to `bun run` instead.
@birkskyum
Copy link
Collaborator

birkskyum commented Oct 9, 2023

--bun is still needed to force usage of Bun in many cases - The default behaviour of using Node.js wasn't changed at the 1.0 release despite it being the initial plan. IIRC there has been a PR merged into vite that helps it recognize bun, but this documentation still serves a purpose, until the switch is flipped to default the --bun behaviour under the hood.

@jonkoops
Copy link
Author

jonkoops commented Oct 9, 2023

Thanks for the info @birkskyum. Would you like me to keep this PR open in the mean time? I can also create a new PR that more accurately reflects the current status.

IIRC there has been a PR merged into vite that helps it recognize bun

I am not sure if correct, but I assume you are referring to vitejs/vite#14379. If that is the case, that has now landed in a recent release.

until the switch is flipped to default the --bun behaviour under the hood.

So this will have to be done in Bun, and not in Vite, correct? Is there a place where this progress can be tracked?

@birkskyum
Copy link
Collaborator

I don't think it can be tracked anywhere, but yes, it's a change that will be in Bun when things generally don't break.

@birkskyum
Copy link
Collaborator

Regarding if this should be kept changed: cc @colinhacks

@yukulele
Copy link
Contributor

If that request isn't acceptable, this one should be : #6399

@jonkoops
Copy link
Author

If that request isn't acceptable, this one should be : #6399

Yeah, I think it's worth removing the 'after 1.0', since it no longer is correct.

@colinhacks
Copy link
Contributor

colinhacks commented Oct 10, 2023

As mentioned elsewhere we ultimately decided to respect shebangs by default with bun run so --bun is still necessary post-1.0. Thanks everyone, sorry for any confusion there.

@colinhacks colinhacks closed this Oct 10, 2023
@jonkoops jonkoops deleted the no-bunx-vite branch October 11, 2023 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants