webpack

  • Persistent caching, and a warm build that is seconds

    Every build in 4 started from nothing, which on a large application is a minute of parsing and transpiling that produces the same result as last time. buildDependencies…

  • Module federation exists and is probably not for you

    5 shipped the ability for one bundle to load modules from another at runtime, which is genuinely novel and solves a problem most applications do not have. The…

  • webpack 5, and the polyfills that stopped being automatic

    The build broke on a package importing crypto. webpack 4 quietly bundled a browser shim; 5 does not, and the error is the correct one.

  • Deterministic module ids, and long-term caching

    Numeric module ids in 4 shifted when a module was added, which changed the content of every chunk after it and invalidated caches for files that had not…

  • webpack 5 stopped polyfilling Node core modules

    Version 4 silently provided browser implementations of crypto, path and stream; 5 does not, and the first build after the upgrade does not compile. Adding the fallback works…

  • Vue 3 and the Composition API

    A 600-line component with a mixin nobody could trace. The Composition API is not a new way to write components — it is a way to move logic…

  • A dynamic import is a promise and a chunk boundary

    The syntax looks like a function call and is a language feature, and a bundler recognises it as a split point with no configuration at all. The chunk-load…

  • Lazy loading arrived in the browser

    One attribute replaces an IntersectionObserver and a library — and applying it to everything makes the Largest Contentful Paint worse rather than better.

  • The new JSX transform, and the React import that goes away

    Every file using JSX had to import React even when it never referenced it, because JSX compiled to React.createElement. The compiled output imports react/jsx-runtime instead, which is a…

  • TypeScript on a JavaScript codebase, one file at a time

    3.7 shipped optional chaining in November and the objection got smaller. allowJs, checkJs and a per-file opt-in — and strictNullChecks, which is the flag that pays.