question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vite-plugin-cloudflare-workers

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
brilloutcommented, Dec 15, 2021

@Aslemammad

How about this plan?

  1. We explore https://blog.cloudflare.com/cloudflare-pages-goes-full-stack/ in more depth. For example: what are the reasons to use Cloudflare Workers directly instead of Cloudflare Pages?
  2. Depending on 1., we build either one or both vite-plugin-cloudflare/pages and vite-plugin-cloudflare/workers.

About the plugin itself:

  • It sets ssr: { noExternal: true }.
  • It adds shims for Node.js built-ins such as rollup-plugin-node-builtins.
  • After #5936 is implemented, we can then hook a deploy script (e.g. wrangler publish).
Read more comments on GitHub >

github_iconTop Results From Across the Web

Aslemammad/vite-plugin-cloudflare - GitHub
Vite -plugin-cloudflare is a plugin for transforming & bundling cloudflare workers with shimming modern node polyfills like process , os , stream and...
Read more >
Cloudflare Workers - vite-plugin-ssr
Cloudflare Workers requires our entire worker code to be bundled into a single file. Cloudflare uses the term "worker code" to denote server...
Read more >
vite-plugin-cloudflare-worker - npm
Generate a bundle that runs as a Cloudflare worker, then write it to disk and/or upload it directly to Cloudflare. The bundle is...
Read more >
Deploy a Vite 3 project · Cloudflare Pages docs
Deploy a Vite 3 project · Log in to the Cloudflare dashboard Open external link and select your account. · Go to Pages...
Read more >
Getting Started - Vitedge
This is possible today thanks to Cloudflare Workers, and maybe some other platforms in ... Import vitedge/plugin.js in your vite.config.js :.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found