Webpack and Babel Flashcards
What is Webpack?
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.
What is the advantage of using Webpack (or a similar bundler)?
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.
What is Babel?
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:
What is the advantage of using Babel (or a similar transpiler)?