Webpack Flashcards
What is Webpack?
JavaScript module bundler Starts from an entry point and builds a dependency graph which maps every module your project needs and generates one or more bundles
How do you add a dev dependency to a package?
With –save-dev flag
npm install –save-dev webpack
What is an NPM script?
Method of giving a command a (usually) shorter alias
npm run script
Can add scripts through the package.json file
how do you execute webpack with npm run?
npm run webpack
or create a script that runs webpack and then type npm run script
What is Babel?
JavaScript compiler that is used to convert ES6(ES 2015+) code into backwards compatible version of JS
Can also convert jsx into javascript for react
What is a plug-in?
software component that adds a specific feature to an existing computer program
Plug-in is not necessary for the basic functionality of the program
What is a webpack loader?
transformations that are applied to the source code of a module
plug-in for Webpack
Can transform files from a different language to JavaScript
How can you make Babel and Webpack work together?
install both webpack and babel + babel-loader as dev dependencies