my-vite-app/
│
├── node_modules/
├── public/
├── src/
│ ├── App.css
│ ├── App.jsx
│ ├── index.css
│ └── main.jsx
│
├── .gitignore
├── index.html
├── package.json
├── README.md
├── vite.config.js
└── yarn.lock / package-lock.json
node_modules/Just like CRA, this folder stores all installed npm packages (like React, Vite plugins). Managed by npm or Yarn.
public/Contains static files accessible at runtime. Vite serves files from this folder as-is without bundling via ESM.
index.htmlThe single HTML page where your React app is loaded. Vite injects the React app here automatically.
Vite HTML processing happens here.
src/ (Source Folder)Main place for your app's code:
ReactDOM.createRoot() renders your app to the DOM.App.jsx.vite.config.jsThis file contains configuration options for Vite, like aliases, plugins, and server settings. Much simpler than Webpack config.
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
});
node_modules.public/index.html separation — Vite uses index.html directly at root.vite.config.js.src/
├── assets/
│ └── logo.png
├── components/
│ ├── Header.jsx
│ └── Footer.jsx
├── pages/
│ ├── Home.jsx
│ └── About.jsx
├── hooks/
│ └── useFetch.js
├── App.jsx
├── main.jsx
└── index.css
index.html is in the root (not in public/).