Babel Flashcards

1
Q

What is Babel?

A

A JavaScript compiler

A toolchain that converts any form of JavaScript into a backwards compatible JavaScript.

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

What are Babel’s key features?

A
  • Transforms syntax
  • Polyfill features that are missing in your target environment
  • Source code transformations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Plug-in?

A

A software component that adds a specific feature to an existing program. This allows customization.

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

What is a Webpack loader?

A

Allows the pre-process of files before Webpack bundles imported files

It can also transform source code of a module

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

How can you make Babel and Webpack work together?

A

Saving babel as a devDependency and then adding babel-loader in the webpack.config module under the loader section.

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

What is the order in which babel is used to produce backward compatible code?

A

JavaScript is written
JavaScript imports are entered into Webpack bundler
Webpack bundler uses Babel loader to integrate Babel
Babel uses plug-ins to read code for any block scoping, arrow functions, and classes.
Babel sends the read code back to the Webpack bundler
Artifact JavaScript is produced

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