hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

Add support for Vite 7 in @shopify/mini-oxygen

Open ramonclaudio opened this issue 2 months ago • 0 comments

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

@shopify/[email protected] & @shopify/[email protected]

What version of Remix are you using?

No response

Steps to Reproduce

  1. Create a new Hydrogen storefront project with @shopify/[email protected]
  2. Install Vite 7.x: npm install vite@^7.1.9
  3. Attempt to start the development server: npm run dev
  4. Observe the error:
ReferenceError: __vite_ssr_exportName__ is not defined
    at server.ts:1

Expected Behavior

MiniOxygen should support Vite 7.x, allowing developers to use the latest stable version of Vite with all its performance improvements, bug fixes, and new features. The development server should start successfully without downgrading to Vite 6.x.

Actual Behavior

The development server fails to start when Vite 7.x is installed due to incompatibility between Miniflare v4 and Vite 7's SSR implementation. Developers are forced to downgrade to Vite 6.x by either:

  • Manually installing vite@^6.3.6, or
  • Using npm overrides to force the Vite version

ramonclaudio avatar Oct 14 '25 13:10 ramonclaudio