Learn how Webpack bundles JavaScript by running each numbered demo in sequence from basics to advanced.
Understand how to include CSS and images inside JavaScript using Webpack loaders via a minimal working example.
See how code splitting and vendor chunk caching work in a self-contained Webpack config you can inspect.
Wire up a React app with client-side routing using a Webpack configuration built from scratch.
| ruanyf/webpack-demos | gabrielbull/react-desktop | mobz/elasticsearch-head | |
|---|---|---|---|
| Stars | 9,570 | 9,495 | 9,483 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Run npm install at the repo root once, then npm run start inside each numbered demo folder, requires Node.js.
This repository is a collection of 15 short, self-contained examples that teach how Webpack works. Webpack is a tool developers use to take many separate JavaScript files and combine them into one (or a few) optimized files that a browser can load efficiently. Instead of reading dense documentation, learners can clone this repo and run each demo in sequence to see exactly what Webpack does at each step. The demos start from the basics, showing how a single entry file gets turned into a bundle, and progressively introduce more advanced ideas. Along the way they cover how to include CSS and images inside JavaScript, how to transform modern JavaScript syntax so older browsers can understand it, how to split a large codebase into smaller chunks that load only when needed, and how to separate third-party libraries into their own file so the browser can cache them between page loads. Each demo lives in its own numbered folder and comes with a small configuration file, a minimal HTML page, and source files that illustrate exactly one concept. To run any demo, you install dependencies once at the root level and then start a local development server inside the demo folder. The server opens a browser tab automatically so you can see the result. The collection also demonstrates several Webpack plugins: one that shrinks the final file size by stripping unnecessary characters, one that generates the HTML page automatically, and one that injects environment-specific code only during development. A final demo shows how to wire up a React application with page routing using the same Webpack setup. This is a learning resource, not a production template. Each example is intentionally minimal so the concept being shown stays visible without surrounding noise.
A collection of 15 minimal, numbered Webpack examples that teach bundling concepts step by step, from a single entry file to code splitting, CSS loaders, and a full React setup.
Mainly JavaScript. The stack also includes JavaScript, Webpack, React.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.