workers-sdk
workers-sdk copied to clipboard
Vite 8 Support [@cloudflare/vite-plugin]
What versions & operating system are you using?
npmPackages:
@cloudflare/vite-plugin: 1.15.3
vite: 8.0.0-beta.0 => 8.0.0-beta.0
Please provide a minimal reproduction
pnpm create cloudflare@latest --template=cloudflare/templates/vite-react-template vite-8-cloudflare
cd vite-8-cloudflare
pnpm add [email protected]
Describe the Bug
Cloudflare's Vite plugin works without error, but causes the following warnings:
You or a plugin you are using have set `optimizeDeps.esbuildOptions` but this option is now deprecated. Vite now uses Rolldown to optimize the dependencies. Please use `optimizeDeps.rolldownOptions` instead.
Please provide any relevant error logs
No response
Thanks for the issue. We'll be improving compatibility with Vite 8 during the beta period.
Related issue: https://github.com/cloudflare/workers-sdk/issues/11299
FYI one thing that doesn't work between the Cloudflare Vite plugin and Vite 8 is that the Cloudflare plugin sets "es2024" as the build target and Vite errors on build with
error during build:
Build failed with 1 error:
[plugin vite:css-post]
Error: [lightningcss minify] Unsupported target "es2024"
I've created an issue and a PR for the Vite CSS plugin to add "es2024" as a build target.