A SvelteKit adapter that minifies prerendered HTML output pages using html-minifier-terser. v1.0.4 stable. It wraps any existing adapter (e.g., @sveltejs/adapter-static) and runs minification after the default adapter finishes. Only works on prerendered pages; runtime-rendered pages are not minified. Supports custom build paths and minifier options. Ships TypeScript types. Active development.
npm install sveltekit-html-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures SvelteKit to minify prerendered HTML using adapter-static as base.
Ensure pages have `export const prerender = true;` and that prerendered output path matches the adapter's output.
Set `pages` option explicitly, e.g., for Cloudflare: `{ pages: '.svelte-kit/cloudflare' }`; for Vercel: `{ pages: '.svelte-kit/output/prerendered/pages' }`.Place your primary adapter as the first argument; this adapter wraps and post-processes.
Use `import` syntax or change your project to ESM (add `"type": "module"` to package.json).
Ensure page has `export const prerender = true;` and the `pages` option matches your adapter's output folder.