From af194e2f25bb6bd836a75b358e8071a9225639a1 Mon Sep 17 00:00:00 2001 From: Howard Chiam Date: Fri, 14 Jun 2024 00:46:48 -0600 Subject: [PATCH] docs(guide): explicitly mention how to install vite (#16583) (#17404) Co-authored-by: bluwy --- docs/guide/index.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/guide/index.md b/docs/guide/index.md index f76d0237918472..57eb89eb0053fd 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -105,6 +105,44 @@ npm install npm run dev ``` +## Manual Installation + +In your project, you can install the `vite` CLI using: + +::: code-group + +```bash [NPM] +$ npm install -D vite +``` + +```bash [Yarn] +$ yarn add -D vite +``` + +```bash [PNPM] +$ pnpm add -D vite +``` + +```bash [Bun] +$ bun add -D vite +``` + +::: + +And create an `index.html` file like this: + +```html +

Hello Vite!

+``` + +Then run the `vite` CLI in your terminal: + +```bash +vite +``` + +The `index.html` will be served on `http://localhost:5173`. + ## `index.html` and Project Root One thing you may have noticed is that in a Vite project, `index.html` is front-and-central instead of being tucked away inside `public`. This is intentional: during development Vite is a server, and `index.html` is the entry point to your application.