wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Vite React MCQ Questions

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

What command is used to create a new Vite project?

a)

npm init vite

b)

npm create vite@latest

c)

npx create-react-app

d)

npm run vite

2.

Which option is used to select React when creating a Vite app?

a)

Vue

b)

Svelte

c)

React

d)

Angular

3.

What command installs project dependencies after creating a Vite app?

a)

npm run dev

b)

npm install

c)

npm build

d)

npm start

4.

Which file contains the project’s entry HTML in a Vite app?

a)

index.js

b)

App.jsx

c)

index.html

d)

vite.config.js

5.

What is the default command to run a Vite development server?

a)

npm run dev

b)

npm start

c)

vite serve

d)

npm run start

6.

Where is the main React component defined in a new Vite-React project?

a)

index.html

b)

App.jsx

c)

main.jsx

d)

vite.config.js

7.

Which file is responsible for mounting the React app to the DOM?

a)

App.jsx

b)

index.html

c)

main.jsx

d)

vite.config.js

8.

What script builds the Vite app for production?

a)

npm run dev

b)

npm run build

c)

npm build

d)

vite build

9.

Where does the production build of a Vite app get output?

a)

/public

b)

/src

c)

/dist

d)

/build

10.

Which configuration file is used in Vite projects?

a)

vite.config.js

b)

webpack.config.js

c)

vite.js

d)

config.json

11.

What is the default package manager for installing dependencies in Vite?

a)

npm

b)

yarn

c)

pnpm

d)

All of the above

12.

Which command removes node_modules and reinstalls dependencies?

a)

npm rebuild

b)

npm ci

c)

npm reset

d)

npm install

13.

What JSX file usually defines the UI in a React-Vite app?

a)

main.jsx

b)

index.html

c)

App.jsx

d)

vite.config.js

14.

Which file holds environment variables in Vite?

a)

vite.config.js

b)

.env

c)

config.json

d)

env.js

15.

What port does Vite usually run on by default?

a)

3000

b)

4000

c)

5173

d)

8080

16.

Which command checks the Vite version?

a)

vite -v

b)

npm vite -v

c)

npm run vite --version

d)

vite --check

17.

What does HMR stand for in Vite?

a)

Hot Module Replacement

b)

High Memory Runtime

c)

Host Module Runner

d)

Hybrid Module Rendering

18.

What syntax is used to import CSS in Vite React?

a)

require('style.css')

b)

import './App.css'

c)

include './App.css'

d)

link './App.css'

19.

Which folder is mainly used to store React components?

a)

/public

b)

/components

c)

/dist

d)

/assets

20.

Which statement about Vite is true?

a)

Vite uses Webpack internally

b)

Vite provides faster dev server startup

c)

Vite does not support React

d)

Vite cannot use TypeScript