Vite-plugin-cloudflare is a software for transforming & bundling cloudflare workers with shimming node globals and builtins like process
, os
, stream
and plenty of other node functions and modules using Esbuild and Vite!
npm install -D vite-plugin-cloudflare
vite-plugin-cloudflare build input.ts worker.js
# or
vpc build input.ts worker.js
Now you can upload or use the worker.js
file as your cloudflare worker file.
vpc dev input.ts
Here you can navigate to localhost:3000
and see the output of your worker. With every change to the related files, Esbuild is going to rebuild incrementally through the Vite server, then Miniflare reloads the script so you can check the new results by refreshing your browser or reloading your client.
For seeing more options:
vpc -h
And more examples in test/.
?raw
support like vitejs__STATIC_CONTENT_MANIFEST
as externalBest DDoS Attack Script Python3, (Cyber / DDos) Attack With 56 Methods
modern polyfills for node native modules based on jspm-core
Tauri + Vite + Vue 3 + Vuetify 3 desktop app template
Vite + TypeScript + React + React Router Dom + LazyLoading + Jest-RTL + Styled-Components Boilerplate
😍 Use React Context better.
Link shortener written in golang