webpack Flashcards
What is Webpack?
Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.
How do you add a devDependency to a package?
By using the –save-dev flag when running npm install.
What is an NPM script?
Code that automates a task that can be executed using npm run.
How do you execute Webpack with npm run?
Run the script it is aliased to. In our case, npm run build
How are ES Modules different from CommonJS modules?
Their syntax is even more compact that CommonJS’s; Their structure can be statically analyzed (for static checking, optimization, etc.); Their support for cyclic dependencies is better than CommonJS
What kind of modules can Webpack support?
ECMAScript modules, CommonJS modules, AMD modules, Assets, WebAssembly modules