fw-07 step 02 — Splitting, shaking, and source maps

Tasks

  1. Code splitting on dynamic import(); emit separate chunks loaded on demand.
  2. Tree shaking: mark used exports, drop the rest. Then break it — drop a module with a top-level side effect and watch the app fail. Implement the conservative fallback and the sideEffects opt-in.
  3. Source maps, composed across your transform chain. Off-by-one a mapping deliberately and try to debug through it.
  4. Over-split: 200 chunks. Measure time-to-interactive on a throttled connection against a single bundle. Record which won and why.

Done when

  • Unsafe tree shaking reproduced, then made safe by an author assertion
  • Splitting measured on a throttled profile, with a recorded verdict
  • Broken source map experienced once