---
title: "Best-in-Class Developer Experience with Vite and Hydrogen"
description: "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."
url: "https://swe.quest/articles/best-in-class-developer-experience-with-vite-and-hydrogen-71158a029a23fe79"
canonical: "https://shopify.engineering/developer-experience-with-hydrogen-and-vite"
source: "Shopify Engineering"
published: "2022-03-31"
difficulty: "easy"
kind: "Case study"
reading_minutes: 8
tags: ["build-systems","frontend","react","javascript","developer-productivity"]
---

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

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-03-31, 8 min read, Case study. Original: [https://shopify.engineering/developer-experience-with-hydrogen-and-vite](https://shopify.engineering/developer-experience-with-hydrogen-and-vite)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [React](https://swe.quest/tags/react.md) (Web & mobile)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)

## Prerequisites

- JavaScript modules (ESM/CommonJS) ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- React basics ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))
- Frontend bundlers ([easy posts on Frontend](https://swe.quest/tags/frontend.md?difficulty=easy))

## Keywords

Vite, Hydrogen, Webpack, ESBuild, Rollup, React Server Components, Shopify

## Related posts

- [How We Built Hydrogen: A React Framework for Building Custom Storefronts](https://swe.quest/articles/how-we-built-hydrogen-a-react-framework-for-building-custom-storefronts-0de0baea8226959f.md): Shopify Engineering · 2022-06-22 · Medium · 13 min read · React, Frontend, Web performance, GraphQL, E-commerce
  Hydrogen, Shopify's React framework for custom storefronts, was built on React Server Components, React 18 streaming SSR and Vite, chosen over static JAMStack approaches because commerce pages are inherently dynamic.
- [Why We Switched From Webpack To Vite](https://swe.quest/articles/why-we-switched-from-webpack-to-vite-bb748200f241985c.md): Replit · 2021-04-28 · Easy · 2 min read · Build systems, Frontend, JavaScript, React, Developer productivity
  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.
- [What We Learned Migrating From Webpack to Vite](https://swe.quest/articles/what-we-learned-migrating-from-webpack-to-vite-14623bb3ac0e8ed2.md): Neon · 2024-11-20 · Medium · 5 min read · Frontend, Build systems, Developer productivity, JavaScript
  Neon moved its console, a set of SPAs whose HTML is rendered by a Go backend, from webpack to Vite.
- [Optimizing Our Build Times by Migrating from Webpack to Rspack](https://swe.quest/articles/optimizing-our-build-times-by-migrating-from-webpack-to-rspack-0081a00fe51c01d6.md): Yelp Engineering · 2026-05-20 · Medium · 6 min read · Build systems, JavaScript, Frontend, Performance engineering, Refactoring & migrations
  Yelp moved its JavaScript monorepo builds from Webpack to Rspack and cut integration build time by about 52% on average.
- [Fresh 2.0 Graduates to Beta, Adds Vite Support](https://swe.quest/articles/fresh-2-0-graduates-to-beta-adds-vite-support-98975c3541d22bf3.md): Deno · 2025-09-02 · Easy · 3 min read · Frontend, JavaScript, Build systems, Performance engineering
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
