Babel Flashcards
What is Babel?
A JavaScript compiler
A toolchain that converts any form of JavaScript into a backwards compatible JavaScript.
What are Babel’s key features?
- Transforms syntax
- Polyfill features that are missing in your target environment
- Source code transformations
What is a Plug-in?
A software component that adds a specific feature to an existing program. This allows customization.
What is a Webpack loader?
Allows the pre-process of files before Webpack bundles imported files
It can also transform source code of a module
How can you make Babel and Webpack work together?
Saving babel as a devDependency and then adding babel-loader in the webpack.config module under the loader section.
What is the order in which babel is used to produce backward compatible code?
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