How a Bundler Works Playground

Dodi’s assembly line: six modules become one bike. Step by step the bundler reads the imports from main.js, works out the run order, finds a cycle and an…

Why it matters

Most confusing build trouble (a file that never comes along, a build broken by one letter, undefined from another module) is a step of this walk. Knowing how a bundler reads and orders modules makes those errors readable.

The key idea

A bundler only knows what the entry reaches, and what is imported always runs first

Common mistakes

Try it in this playground