Category: react
what is vite
Published on 15 Aug 2026
Explanation
Vite is a modern frontend build
tool and development server commonly used
for React applications. It provides a
fast development environment
and creates optimized
production builds.
Code:
npm create vite@latest my-app cd my-app npm install npm run dev
Explanation
React is a JavaScript library used
to build user interfaces, while Vite
provides the development server and build
tools needed to develop and deploy
the React application.
Code:
React β Builds the UI Vite β Runs and builds the application
Explanation
Vite starts a local development server
that allows developers to run and
test their application in the browser
while developing.
Code:
npm run dev // Example: http://localhost:5173
Explanation
Vite provides fast startup and quickly
updates the browser when source code
changes, making the development
experience faster
and more convenient.
Code:
function App() {
return <h1>Hello Vite</h1>;
}
Explanation
Vite can create optimized files for
production deployment using the build
command.
Code:
npm run build // Production files are generated in the dist folder.