bundling static assets

I have some npm packages I use in both the worker, and in the html/js page I serve in the static assets. Is there any way to automatically bundle the html page so I can easily use the package there too?
3 Replies
DuskyMountain
DuskyMountainOP7mo ago
wrangler does install esbuild I guess, so I can run that manually with a script somewhere?
Hard@Work
Hard@Work7mo ago
I would probably use Vite?
Hard@Work
Hard@Work7mo ago
Cloudflare Docs
Vite plugin
A full-featured integration between Vite and the Workers runtime

Did you find this page helpful?