SPRING CONCEPTS

Vite

Spring Concepts / Vite

Vite is the frontend development server and build tool.

Understand the idea

It serves the frontend during development and bundles production assets when building. Its React plugin transforms JSX. The development port is fixed so the browser origin stays aligned with backend CORS settings.

A concrete example

npm install
npm run dev
npm run build

In the application

frontend/vite.config.js enables the React plugin; package.json sets the server to port 5173 with strictPort.

Do not open frontend/index.html as a local file to run the React app. Start the Vite server.

Related concepts

Read the official documentation ↗
Java 21 · Spring Boot 4.1.1 · Edupoly