Easy way in wrangler to minify and obfuscate html, js and css?

What’s the easiest way to minify and obfuscate html, js and css content within workers?

Is there any way to enable this functionality within wrangler so it’s automatically done on “wrangler publish”?

Ideally I’d prefer the content to be packaged and uploaded already minified and obfuscated so it doesn’t need to be done on-the-fly.


Hi there!

This is an interesting question and not one I have attempted myself, but I believe a potential solution may exist in the form of using a Webpack configuration (https://developers.cloudflare.com/workers/cli-wrangler/webpack) in conjunction with Wrangler.

I believe that this should allow for the use of modules that you can then use to apply styling/minifying/obfuscating changes to your script prior to deploying.

I hope this helps!