obfuscate-hogoshi
v0.1.4
Published
Post-build obfuscator for a Next.js app.
Readme
obfuscate-hogoshi
Post-build obfuscator for a Next.js app.
Repository: https://github.com/zhogoshi/hogoshi-obfuscate
Package: obfuscate-hogoshi
What
After next build, it rewrites the .next output:
- client chunks are minified, then obfuscated
- CSS and HTML are minified
- optional gzip and brotli copies of static files
The Turbopack and webpack runtime files are left alone so the app can still start.
Why
Next does not take the Vite plugins used by a React SPA. This runs on the finished build, so CSS, HTML, and JS stay in agreement.
Install
pnpm add -D obfuscate-hogoshiUse
pnpm build
obfuscate-hogoshi .nextobfuscate-hogoshi .next --precompress
obfuscate-hogoshi .next --no-css --no-htmlFrom a checkout of this repository, before the package is on npm:
node src/cli.js /path/to/app/.nextRun it only on a production build you are about to ship. Do not commit the rewritten .next folder.
