vite

  • Vite 5, and the Node 18 minimum

    The November release drops Node 16, which reached end of life in September, and the upgrade was mostly about the runtime rather than the tool. A major version…

  • The bundle we split by route, and the waterfall it created

    A 900 KB bundle, split by route, and a page that got slower. Six sequential requests before the first render.

  • import.meta.glob for a route table

    A route table maintained by hand next to a directory of route files, forgotten on average once a month. The build-time resolution is what makes this safe: the…

  • manualChunks, and a vendor bundle that was one library

    A 410 KB vendor chunk that invalidated on every dependency update, of which 280 KB was a date library used in two places. Splitting a rarely-used heavy dependency…

  • The Webpack config we finally deleted

    A 340-line configuration accumulated between 2017 and 2021, replaced by a Vite config of 24 lines, and the deletion took longer than the replacement. Most of the file…

  • verbatimModuleSyntax, and the type import being emitted

    An import used only as a type was being elided or preserved depending on flags nobody could keep straight, and the bundler saw a different module graph from…

  • TypeScript 5, and the decorators we had been faking

    5.0 in March, decorators that are the standard proposal rather than the old flag, and a build nobody could explain.

  • A dev server proxy instead of CORS in development

    Adding permissive CORS headers so a dev server on 5173 can reach an API on 8080 means the development configuration differs from production in a security-relevant way. The…

  • A Vite plugin hook order that is Rollup’s, not Vite’s

    A Vite plugin is a Rollup plugin with extra optional hooks, so the ordering rules and the hook names come from Rollup’s documentation rather than Vite’s. The enforce…

  • import.meta.glob is a Vite feature, not a standard

    Globbing imports removes an index file that had to be maintained by hand, and it ties the code to one bundler. The lazy form code-splits per entry with…