Webpack / Babel Flashcards

1
Q

What is Webpack?

A

Webpack is a package that bundles modules together into a single script for usage in a browser.

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 package-name –save-dev

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

What is an NPM script?

A

A shell script stored inside package.json that can be executed by the “npm run” command.

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 (e.g. build)

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

What is Babel?

A

Babel is a compiler that takes JavaScript and JSX code and compiles it to a specified version of JavaScript.

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

What is a Plug-in?

A

An add-on that adds a specific feature to an existing piece of software.

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

What is a Webpack loader?

A

A Webpack loader preprocesses code before it gets bundled by Webpack.

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

How can you make Babel and Webpack work together?

A

Specify in the webpack.config.js file that Babel and the desired plugins should be used before building.

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