The purpose of this project is to explain how most bundlers work under the hood. It contains a short implementation of a simplified but still reasonably accurate bundler. Along with the code, there are comments explaining what the code is trying to achieve.
- Entry : An entry point indicates which module webpack should use to begin building out its internal dependency graph
- Output : The output property tells webpack where to emit the bundles it creates and how to name these files.
- Loaders : Loaders allow webpack to process other types of files (other then
.js) and convert them into valid modules.
- Plugins : Plugins can be leveraged to perform a wider range of tasks like bundle optimization, asset management and injection of environment variables.
Theses tools uses the webpack stats API, usage is
$ webpack --profile --json > compilation-stats.json