-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite-plugin-cloudflare-workers #223
Comments
Also @frandiox Collaborating on a common Cloudflare Workers deploy script would benefit Hydrogen as well. Eventually SvelteKit Astro etc. we would all collaborate on |
@brillout For some reason the link to Discord doesn't work for me :/ |
Title had typo, I meant For now The Vite integration part is probably less interesting for Hydrogen, but collaboarting on the server-side bunlding script would benefit everyone including Hydrogen and Cloudflare Workers would also be interested in this (I believe you guys are in talks with them). There are a lot of subtle nuances in worker bundling that makes it complex and well worth to collaborate on. Thoughts? |
The thing is, in Hydrogen we use Vite itself to bundle for workers via Maybe I'm missing something here, what other bundling do you have in mind?
Ah yes, I had to make a CLI just for this in vite-ssr/Vitedge... it would be cool if we could either pass custom flags or build steps :) |
Makes sense, a plugin would make more sense for other platforms like Vercel. Alghough after #5936 it could still make sense. We didn't talk with Vite's team about it but I can see them merging it in. |
Actually, Many, if not most, libraries have Node.js dependencies; So a |
@brillout Ah right, that could be useful to make things work with different 3p libraries. I've seen a bunch of libraries calling So this plugin would provide custom Vite resolutions to |
Exactly. We would maintain This will benefit both Vite's and Cloudflare's ecosystem. |
Btw. you/jplhomer mentioned an upcoming PR for Vite + React Server Components, is it live? |
@brillout yep, it's here: facebook/react#22952 Beware that this approach is still not validated by the React team, it's just an exploration 😅 |
That's exciting 👀. I've suscribed to the PR and I'll have a look at the code after Vike's MVP. Also seeing Shopify/hydrogen#249, which is super exciting as well. I will have a closer look at Hydrogen after I release Vike's MVP. |
How about this plan?
About the plugin itself:
|
https://github.com/Aslemammad/vite-plugin-cloudflare-workers going to work on it! Thank you all! |
vite-plugin-ssr already supports Cloudflare Workers https://vite-plugin-ssr.com/cloudflare-workers but it would be lovely to have a
vite-plugin-cloudflare-workers
so that the entire Vite ecosystem can benefit.Discussoin about this: https://discord.com/channels/815937377888632913/815937377888632916/915547793987350548
I've secured the npm package and I'm happy to give it away.
The text was updated successfully, but these errors were encountered: