astro-unminify-cloudflare
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

astro-unminify-cloudflare

Astro integration to unminify the generated Cloudflare worker.

The Astro Cloudflare integration minifies the generated worker.js file by default depending on the global vite configuration. This causes some issues:

  • Deployments sometimes fail with no apparent reason.
  • Any stack traces from errors become useless if the code is compiled.
  • Globally disabling minification also affects client scripts, significantly increasing their size and preventing the usual framework optimizations.

This integration disables minification only for the server-side, preserving all critical optimizations for the client. This approach maintains the benefits of having a plain file that can be easily deployed to Cloudflare Pages, while avoiding the aforementioned issues.

Install

npm astro add astro-unminify-cloudflare

Package Sidebar

Install

npm i astro-unminify-cloudflare

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

4.07 kB

Total Files

6

Last publish

Collaborators

  • ernestoalejo