NEW
Font size
WorksheetsVite React MCQ Questions
Total questions: 20
Worksheet time: 7mins
What command is used to create a new Vite project?
npm init vite
npm create vite@latest
npx create-react-app
npm run vite
Which option is used to select React when creating a Vite app?
Vue
Svelte
React
Angular
What command installs project dependencies after creating a Vite app?
npm run dev
npm install
npm build
npm start
Which file contains the project’s entry HTML in a Vite app?
index.js
App.jsx
index.html
vite.config.js
What is the default command to run a Vite development server?
npm run dev
npm start
vite serve
npm run start
Where is the main React component defined in a new Vite-React project?
index.html
App.jsx
main.jsx
vite.config.js
Which file is responsible for mounting the React app to the DOM?
App.jsx
index.html
main.jsx
vite.config.js
What script builds the Vite app for production?
npm run dev
npm run build
npm build
vite build
Where does the production build of a Vite app get output?
/public
/src
/dist
/build
Which configuration file is used in Vite projects?
vite.config.js
webpack.config.js
vite.js
config.json
What is the default package manager for installing dependencies in Vite?
npm
yarn
pnpm
All of the above
Which command removes node_modules and reinstalls dependencies?
npm rebuild
npm ci
npm reset
npm install
What JSX file usually defines the UI in a React-Vite app?
main.jsx
index.html
App.jsx
vite.config.js
Which file holds environment variables in Vite?
vite.config.js
.env
config.json
env.js
What port does Vite usually run on by default?
3000
4000
5173
8080
Which command checks the Vite version?
vite -v
npm vite -v
npm run vite --version
vite --check
What does HMR stand for in Vite?
Hot Module Replacement
High Memory Runtime
Host Module Runner
Hybrid Module Rendering
What syntax is used to import CSS in Vite React?
require('style.css')
import './App.css'
include './App.css'
link './App.css'
Which folder is mainly used to store React components?
/public
/components
/dist
/assets
Which statement about Vite is true?
Vite uses Webpack internally
Vite provides faster dev server startup
Vite does not support React
Vite cannot use TypeScript
