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

Vite Package Manager #16538

Closed
4 tasks done
darkgreentree opened this issue Apr 26, 2024 · 1 comment
Closed
4 tasks done

Vite Package Manager #16538

darkgreentree opened this issue Apr 26, 2024 · 1 comment

Comments

@darkgreentree
Copy link

darkgreentree commented Apr 26, 2024

Description

Bun package manager is a project very convenient as: package manager, test runner, runtime, bundler, server, and executable compiler. https://bun.sh/docs/cli/install

It overlaps Vite's scope in its features: Vitest (test runner), Vite (runtime, bundler, server).

Bun has its limitations because it is a more closed ecosystem, with few extensions/hook points.

  • Vite's modularity is appreciated.
  • Bun is not possible to be installed in some contexts where Node.js is to be expected.

As a result, Bun is appreciated when it simplifies features that were a terrifying task before, however Bun only delivers its benefits when we switch everything to Bun. Vite is the one better positioned to make a contribution to the Package Manager situation of JavaScript.

I would like to see Vite enabling a simple way to download packages, without the need to install a different version of npm/pnpm/yarn/bun/bower/chomp/jspm directly for each project. This is where Bun shines, but then everyone needs to download Bun.

It would be even more interesting if Vite could have internal integration with these package managers, in case they are already installed in the system.

Vite could provide a native API, for example, to search packages for projects installed in the workspace, and when trying to download packages itself, avoiding the need of package managers installed in the system at all.

Not necessarily this is to be a feature to be developed inside Vite. Just like Vitest is another project under your umbrella, there could be a project of yours just focused to create this package manager or profound integration with package managers.

This would be awesome for server projects.

Suggested solution

To draw inspiration from Bun package manager:
https://bun.sh/docs/cli/bunx

Or to serve APIs that could be used by package managers or by a plugin to integrate package managers, instead of them doing everything dissociated from Vite.

Alternative

No response

Additional context

No response

Validations

@bluwy
Copy link
Member

bluwy commented Apr 29, 2024

We can't carry the additional maintenance with this like #16537. Building a package manager is a very big task and is not part of Vite's scope. Vitest, while related to Vite and have maintainers in the Vite core team as well, aren't under our control. The Vitest core team are free to develop in ways they see fit and we don't have a heavy influence in its (future) direction.

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants