Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 5 min read Case study mediumAdept

What We Learned Migrating From Webpack to Vite

Neon moved its console, a set of SPAs whose HTML is rendered by a Go backend, from webpack to Vite. Because the backend generates the HTML, they built a ~150-line custom proxy on Vite's JS API and http-proxy that swaps production asset tags (marked with HTML comments) for Vite dev imports to enable HMR, while E2E tests bypass the proxy and use production bundles. Build time did not improve (20s to 22s) and cold dev page loads got slower (~1500 files), but the migration removed 17 direct dependencies, added HMR and unified config with Vitest and Storybook. Gotchas included the SWC React plugin panicking on syntax errors, CSS preload errors in production, entry-point name clashes with API routes, CSP adjustments for Vite's WebSocket and undefined process.env.

Assumes: JavaScript bundlershot module replacementsingle-page applications

Related posts

  • Why We Switched From Webpack To Vite

    Replit easyNovice

    Replit rebuilt its React template on Vite instead of Create React App and Webpack, and it starts far faster: Vite was running before the old container had even booted the CRA files. Vite pre-bundles rarely changing dependencies with esbuild, which is written in Go and claimed to be 10-100x faster than JavaScript bundlers. It serves source code as native ES Modules so the browser does the bundling, and its hot module replacement invalidates only the affected modules, so update times stay constant as the app grows. Vue and vanilla JS templates are also available.

  • Optimizing Our Build Times by Migrating from Webpack to Rspack

    Yelp Engineering mediumAdept

    Yelp moved its JavaScript monorepo builds from Webpack to Rspack and cut integration build time by about 52% on average. Rspack was chosen over Vite because it is compatible with Webpack config. The team built an adapter that copies the existing Webpack config and swaps in Rspack-compatible plugins and values, then rolled it out in stages with per-page opt-in on CI and deployment previews. The switch alone gave about a 25% speedup on SSR builds. Codemods replacing star re-exports and import-then-export patterns with named true re-exports added more gains, and Rspack's portable persistent cache cut warm CI builds by up to 80%.

  • Best-in-Class Developer Experience with Vite and Hydrogen

    Shopify Engineering easyNovice

    Shopify's Hydrogen storefront framework is built on Vite. Vite serves user code as native ES Modules and pre-bundles and caches only third-party dependencies, which speeds up dev-server startup and hot module replacement compared with bundle-based tools like Webpack. Other reasons cited for the choice are ESBuild-based transforms, Rollup plugin compatibility, automatic CJS-to-ESM conversion, and SSR hooks that allow environment-specific transforms needed for React Server Components. Hydrogen wraps this in a single Vite plugin that composes four sub-plugins (hydrogen-config, react-server-dom-vite, hydrogen-middleware, plugin-react), while Webpack remains a fit for some advanced use cases.

  • Fresh 2.0 Graduates to Beta, Adds Vite Support

    Deno easyNovice

    Fresh 2.0 enters beta after 63 alphas with a stable architecture, and its final major change is an optional Vite plugin built on Vite's Environment API. The plugin brings hot module reloading for island code and access to the Vite plugin ecosystem for server and client code. It also aliases react to preact/compat automatically. On-demand route loading plus server bundling cut production boot times 9–12×, with the Fresh website dropping from 86ms to 8ms. The <Head> component returns with a simpler, more efficient implementation.

  • Moving Railway's Frontend Off Next.js

    Railway mediumAdept

    Railway migrated its entire production frontend (dashboard, canvas, marketing site, 200+ routes) from the Next.js Pages Router to Vite + TanStack Router/Start in two PRs with zero downtime. The first PR removed all Next.js-specific dependencies such as next/image, next/head and next/router. The second swapped the framework, generating routes from the original page tree, moving 500+ redirects, headers and caching rules into Nitro config, and replacing Node polyfills with browser-native APIs. Builds dropped from over 10 minutes to under two. Railway gave up built-in image optimization (now handled by Fastly at the edge) and some ecosystem plugins, and accepted the immaturity of TanStack Start.

The quest for software engineering knowledge.

Look:
Layout: