Babel Flashcards

1
Q

What is Babel?

A

Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. Here are the main things Babel can do for you:

  • Transform syntax
  • Polyfill features that are missing in your target environment (through a third-party polyfill such as core-js)
  • Source code transformations (codemods)
  • And more! (check out these videos for inspiration)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Plug-in?

A

A software component that adds a specific feature to an existing computer program. When a program supports plug-ins, it enables customization.[1]

A theme or skin is a preset package containing additional or changed graphical appearance details, achieved by the use of a graphical user interface (GUI) that can be applied to specific software and websites to suit the purpose, topic, or tastes of different users to customize the look and feel of a piece of computer software or an operating system front-end GUI (and window managers).

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

What is a Webpack loader?

A

Loaders are transformations that are applied to the source code of a module. They allow you to pre-process files as you import or “load” them. Thus, loaders are kind of like “tasks” in other build tools and provide a powerful way to handle front-end build steps. Loaders can transform files from a different language (like TypeScript) to JavaScript or load inline images as data URLs. Loaders even allow you to do things like import CSS files directly from your JavaScript modules!

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

How can you make Babel and Webpack work together?

A

Babel Loader

This package allows transpiling JavaScript files using Babel and webpack.

npm install -D babel-loader @babel/core @babel/preset-env webpack

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