finds.dev

philipwalton/rollup-native-modules-boilerplate

A demo app showcasing the use of real JavaScript modules in production—complete with cross-browser fallbacks for legacy browsers.

View on GitHubHomepage ↗

★ 224JavaScriptupdated Feb 2024

// the take

A demo repo by Philip Walton (Google Chrome team) illustrating the module/nomodule pattern: ship modern ES module bundles to capable browsers, ship a legacy bundle to everything else, all via Rollup. It was the right answer circa 2019 when IE11 was still a real concern. IE11 is gone now.

- The Rollup config is the actual teaching artifact — it shows code splitting, dynamic import, CommonJS interop, asset hashing, and dual-bundle output in one place, which is still useful for understanding what bundlers actually do

- Philip Walton wrote the companion article too, so the repo and the explanation evolve together — it's not orphaned documentation

- The module/nomodule HTML pattern is implemented cleanly, making it easy to see exactly how browsers self-select the right bundle without JavaScript feature detection

- The core problem it solves no longer exists: IE11 market share is effectively zero and all modern browsers have supported native ES modules for years, so the nomodule fallback is dead weight in 2024

- It's a demo, not a starter — no tests, no CI, no linting pipeline worth reusing, and the Glitch demo link is the only deployed artifact

- React + hand-rolled Rollup config is a pattern nobody wants to maintain; Vite handles all of this transparently and is what you'd actually pick for a new project

- The last meaningful change was years before the 2024 bump, which looks like a dependency nudge rather than active maintenance — the technique has been superseded but the repo hasn't acknowledged it

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
224
Forks
24
Language
JavaScript
Last commit
11 Feb 2024

// nearby

If rollup-native-modules-boilerplate isn't quite it.

All repos →