Top 25 Bundling with Webpack Questions & Answers

Webpack is a JavaScript module bundler which transform front-end assets using separate task runner. However, the line between bundler and task runner has become blurred thanks to community-developed webpack plugins. webpack takes modules with dependencies and generates static assets representing those modules. Sometimes these plugins are used to perform tasks that are usually done outside of webpack, such as cleaning the build directory or deploying the build although you can defer these tasks outside of webpack.

How to install webpack?

Webpack MCQs

webpack questions and answers

Question#1 The distinct feature of Webpack is _.

1)Code-Splitting

2)Bundling

3)Modularity

4)Reusability

Ans : Bundling

Question#2 Which of the following codes can help us perform compilation automatically?

1)load: “webpack ./src/app.js ./dist/bundle.js”

2)build: “webpack ./src/app.js ./dist/bundle.js”

3)automate: “webpack ./src/app.js ./dist/bundle.js”

4)execute: “webpack ./src/app.js ./dist/bundle.js”

Ans : build: “webpack ./src/app.js ./dist/bundle.js”

Question#3 Which of the following software is necessary to install Webpack?

1)Visual Basic

2)node.js

3)JVM

4)All of the above

Ans : node.js

Question#4 Which of the following Webpack features enables Code on Demand?

1)Loaders

2)Plugins

3)Bundling

4)Code-Splitting

Ans : Code-Splitting

Question#5 file:///home/ram/work/webpack_practice/index.html implies that the file gets loaded from the __.

1)Memory

2)Server

3)Local machine

4)None of the options

Ans : Memory

Question#6 Which of the following tells Webpack how to treat a Bundled Code?

1)Entry Point

2)Plugins

3)Output

4)Loaders

Ans : Output

Question#7 Webpack supports third-party libraries.

1)True

2)False

Ans : True

Question#8 Which of the following codes can be used to install the style loader?

1)node install style-loader -save-dev

2)npm install style-loader –save-dev

3)npm install style-loader -save-dev

4)node install style-loader –save-dev

Ans : node install style-loader –save-dev

Question#9 Which helps in using Babel with Webpack?

1)babel-preset-es2015

2)babel-loader

3)None of the options

4)babel-core

Ans : babel-loader

Question#10 Which of the following loaders can be used to process style sheets?

1)style_sheet-loader

2)style-loader

3)css-loader

4)None of the options

Ans : css-loader

Question#11 Webpack understands _ alone.

1)HTML

2)CSS

3)Javascript

4)All of the above

Ans : Javascript

Question#12 Which of the following features is considered to be the backbone of Webpack?

1)Entry and Output

2)Modules

3)Plugins

4)Loaders

Ans : Plugins

Question#13 _ simplifies the creation of HTML files to serve Webpack bundles?

1)ScriptHTMLPlugin

2)HtmlAddPlugin

3)HtmlWebpackPlugin

4)HtmlPlugin

Ans : HtmlWebpackPlugin

Question#14 Plugins are instantiable objects.

1)True

2)False

Ans : True

Question#15 In Webpack, we can use _.

1)Built-in plugins

2)Custom plugins

3)None of the options

4)Both the options

Ans : Custom plugins

Question#16 Custom plugins can be installed through _.

1)None of the options

2)Both the options

3)node.js

4)npm

Ans : npm

Question#17 Webpack can be optimized with which of the following commands?

1)webpack –optimize/minimize

2)webpack optimize -minimize

3)webpack –optimize-minimize

4)webpack optimize minimize

5)webpack –optimize–minimize

Ans : webpack –optimize-minimize

Question#18 Webpack is written in __.

1)React

2)ES6

3)JavaScript

4)Redux

Ans : JavaScript

Question#19 Webpack is a/an __ tool.

1)Open Source

2)Closed Source

3)Paid

4)None

Ans : Open Source

Question#20 A plugin can be instantiated with the keyword __.

1)add

2)new

3)instantiate

4)require

Ans : new

Question#21 Which of the following makes Webpack extensible?

1)Loaders

2)Entry

3)Plugins

4)Output

Ans : Plugins

Question#22 Which of the following is a Node.js express server?

1)webpack–dev-server

2)webpack-dev-server

3)webpack-dev–server

4)webpack–dev–server

Ans : webpack-dev-server

Question#23 CoffeeScript can be transformed to JavaScript with the help of _.

1)Loaders

2)Compilers

3)Translators

4)Plugins

Ans : Translators

Question#24 Webpack is recommended for large web applications.

1)True

2)False

About Author


After years of Technical Work, I feel like an expert when it comes to Develop wordpress website. Check out How to Create a Wordpress Website in 5 Mins, and Earn Money Online Follow me on Facebook for all the latest updates.