Identify the Vite app entry and root
From project files to a page
Vite is a development and build tool, not React itself. It prepares JavaScript modules for the browser. Node.js runs the development tooling on your computer; the browser runs the client application. In this chapter you will follow a small client-only desk planner, from its HTML entry to its production files. React and Vite dependencies must be approved and installed before the app can run; the supplied examples are static, with predicted rather than observed results.
desk-planner/ index.html package.json package-lock.json vite.config.js src/ main.jsx App.jsxThe HTML document is the entry for this Vite app. The module script points to main.jsx, which imports the App component. The package manifest describes scripts and dependencies; the npm lockfile records resolved dependency versions and integrity metadata. The configuration enables the React plugin. This is an original minimal layout, not a promise that every generated template has the same files.
Read the HTML shell
<!doctype html><html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Desk planner</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.jsx"></script> </body></html>The empty div is the place where React will insert the interface. The module script asks the browser to load the entry module through Vite. The title is visible in the browser tab; the body has no app content until the entry runs. The language and viewport declarations help browsers and assistive technology interpret the page. HTML and JSX are different syntaxes; JSX is transformed by the toolchain.
Prepare a safe local environment
Compare the installed Node version to the requirements of the chosen Vite release and template. The retrieved Vite guide lists 20.19+ or 22.12+ in its compatibility note, but individual templates can require more. Prefer a currently supported Node release. In an approved disposable directory, a reviewed create-vite release with the react template can scaffold the project. Select exact versions, review the dependency graph and retain the lockfile before executing installs; the supplied fixture intentionally has no dependency lockfile because no approved packages were available.
Common mistakes
Do not open main.jsx directly as a file or run it with Node: the example expects a browser DOM, module resolution and JSX transformation. A normal Vite setup serves the HTML through a local server. Do not choose Create React App for a new lesson: it was deprecated for new apps in 2025. Vite is suitable for this learning app; framework-level routing, server rendering and data loading are separate decisions.
Practice
Trace index.html to main.jsx and App.jsx. In the accompanying practice, diagnose an entry path that no longer matches the source file. Next, connect the React root to the HTML container.