Webpack Flashcards

1
Q

What is Webpack?

A

Webpack bundles multiple modules into a single JavaScript file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you add a devDependency to a package?

A

npm install –save-dev module name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an NPM script?

A

something that automates repetitive tasks in package.json file, it is a command line command under script in the package.json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you execute Webpack with npm run?

A

npm run script name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are ES Modules different from CommonJS modules?

A

import/export for ES6 Modules

modules.export for CommonJS
import used require for Common JS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What kind of modules can Webpack support?

A

webpack supports the following module types natively: ECMAScript modules. CommonJS modules. AMD modules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly