3. Create base for your app
Let's start building a React app with Vite and pnpm. One pnpm create vite command gives you a handful of files and a demo page that we delete straight away. Before we build anything on top of it, let's see what those files do. A Vite project is easiest to read from the outside in:
vite.config.ts: configuration for the frontend tool.index.html: the main HTML file, with the root div and the main script.src/main.tsx: creates the React app in the root div.src/App.tsx: the first component that we render.
Lessonsโ
- Follow the page into App: in the browser. Read the entry files and clean up the template.
- Create your own project: on your computer. Create the app and meet the
vite.config.tswe use at work.