Install options/guide
Documentation is
- [X] Missing
- [ ] Outdated
- [X] Confusing
- [ ] Not sure?
Explain in Detail
Is there any installation procedure or am I missing something? I know that you can create projects via npm and all the other package managers and that's all well and good. I've done that before and never had an issue.
But, I needed to do something outside of a project with it couldn't find any documentation on how to do that. Searching 'install' on the website just leads you to projects that use Netlify and how to install that. Seems strange. So I installed Vite via homebrew.
A simple rundown of the overall situation could be helpful. Or a 'If you need to, install on your machine with brew install vite'?
Your Suggestion for Changes
Any info about installing Vite itself would de nice.
Reproduction
No response
Steps to reproduce
No response
Vite is only distributed as an npm package. You need to use npm install vite if you want to use Vite, similar to the scaffolded project. I suppose we can add a small section regarding manual installation of Vite. Installing Vite from homebrew is not recommended.
Ok, that checks out. As I said, using it for projects I've never had an issue, I just needed to do run some command and couldn't find Vite globally. Why is it not recommended via brew?
Using homebrew, or synonymously with npm install -g vite, installs Vite globally. When working with npm packages, it's usually recommended to install things per-project (with a package.json) so Vite is versioned and you control when to upgrade it. Otherwise when Vite cuts a new major, it'll break things.
Would a good place to mention npm install vite and npm install -g vite (as well as their yarn equivalents yarn add vite and yarn global add vite) be https://vitejs.dev/guide/ aka https://github.com/vitejs/vite/blob/main/docs/guide/index.md ? I can start a quick PR to at least get feedback/input.
PR ready for review (again): https://github.com/vitejs/vite/pull/17404