This command installs Vite as a dependency inside your project.
- Download Vite package
- Add it inside node_modules
- Allow project to use Vite commands
- Vite is NOT a library like React
- It is a build tool + development server
- It runs in background, not inside your app code
package.json:
{
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
}
}vite.config.js:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()]
})