🌐webpack
Also known as Webpack, webpack.js
A well-known JavaScript bundler. It does a lot, but it is slow to set up.
Think of it like
Think of it like a big old factory with a dial for each job. It can make most things, once set up.
Example
Lucy joins a team whose app has used webpack since 2017. Its config file is 300 lines long.
Why it matters
A huge number of existing apps are built with webpack. You will likely meet it.
Definition
Example code
javascript
module.exports = {
entry: "./src/index.js",
output: { filename: "bundle.js" },
};Common mistake
Key takeaways
- 1One config file. Says where code starts and ends.
- 2Loaders and plugins. Handle CSS, images and more.
- 3Flexible but heavy. Slower than newer tools.