Webpack Flashcards

1
Q

What is Webpack?

A
JavaScript module bundler
Starts from an entry point and builds a dependency graph which maps every module your project needs and generates one or more bundles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you add a dev dependency to a package?

A

With –save-dev flag

npm install –save-dev webpack

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

What is an NPM script?

A

Method of giving a command a (usually) shorter alias
npm run script

Can add scripts through the package.json file

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 webpack

or create a script that runs webpack and then type npm run script

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

What is Babel?

A

JavaScript compiler that is used to convert ES6(ES 2015+) code into backwards compatible version of JS

Can also convert jsx into javascript for react

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

What is a plug-in?

A

software component that adds a specific feature to an existing computer program

Plug-in is not necessary for the basic functionality of the program

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

What is a webpack loader?

A

transformations that are applied to the source code of a module

plug-in for Webpack

Can transform files from a different language to JavaScript

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

install both webpack and babel + babel-loader as dev dependencies

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