Webpack and Babel Flashcards

1
Q

What is Webpack?

A

At its core, webpack is a static module bundler for modern JavaScript applications. When webpack processes your application, it internally builds a dependency graph from one or more entry points and then combines every module your project needs into one or more bundles, which are static assets to serve your content from.

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

What is the advantage of using Webpack (or a similar bundler)?

A

bundle all the code from JavaScript files and npm packages into a single (or a few) files that can be easily downloaded. In the process, many bundlers will remove unused code and may also “minify” and/or “obfuscate” the code by renaming variables and functions to just a few letters. This makes the bundled code even smaller, and also obscures code so it more difficult for prying eyes to decipher. Because of these advantages, most websites use a bundler on their production code.

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

What is Babel?

A

Babel is a JavaScript compiler
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:

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

What is the advantage of using Babel (or a similar transpiler)?

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