Repository navigation
@cloudflare/vite-plugin for Astro? #9008
Replies: 1 comment
|
Your instinct is right, the Vite plugin isn't really meant for Astro. It's built for plain Vite apps and frameworks that wire up the Vite plugin directly, like TanStack Start and React Router. Astro manages its own Vite config and dev server, so installing the plugin manually just fights the adapter. The supported path for Astro is still the @astrojs/cloudflare adapter. Install it with Good news since this question was posted: adapter v13 and up, the one Astro 6 uses, already runs the Cloudflare Vite plugin inside If your project is still on an old adapter, upgrading the adapter and Astro is the easiest way to get everything the plugin offers without fighting Astro's config. |
Uh oh!
There was an error while loading. Please reload this page.
I read https://blog.cloudflare.com/introducing-the-cloudflare-vite-plugin/.
Which looks quite exciting and would like try for an Astro project of mine which currently it's configured with
@astrojs/cloudflareadapter.I tried to make
@cloudflare/vite-pluginwork but failed I'm suspecting things are currently tricky with hints like these:@cloudflare/vite-pluginin Astro side either.So I'm quite lost on this subject and hoping some guidance on it from anyone has some experience on this.
All reactions