cloudflare / vinext

fix: pre-bundle react/jsx-runtime to prevent CJS-in-browser errors (#155)
Add react/jsx-runtime and react/jsx-dev-runtime to the client optimizeDeps.include list. These are CJS modules that Vite's dependency scanner can miss when entries are virtual modules, causing the raw CJS to be served to the browser and producing: SyntaxError: does not provide an export named 'jsx' Explicitly pre-bundling them ensures Vite always converts them to ESM for the browser. Fixes #25
Fred K. Schott Fred K. Schott committed on Feb 28, 2026, 09:08 PM
Showing 1 changed files +9 additions -5 deletions
Browse files at this commit โ†’