A Snowpack plugin that minifies JS (via terser), CSS (via csso), and HTML (via html-minifier) for production builds. Supports source map generation/remapping, optional modulepreload injection, and TypeScript declaration files. Version 0.5.0 (last release June 2020) works with Snowpack ^2.17.1 and is in maintenance mode, as Snowpack has since been deprecated in favor of Vite. It does not bundle; for bundling the official webpack plugin is recommended.
npm install snowpack-plugin-optimizeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Snowpack config enabling minification for JS, CSS, and HTML with source maps and modulepreload.
Ensure your config uses the array form: ['snowpack-plugin-optimize', opt]
Migrate to Vite and use vite-plugin-optimize or similar.
Always wrap options in an array: ['snowpack-plugin-optimize', { ... }]npm install --save-dev snowpack-plugin-optimize
Provide jsOptions as an object with sourceMap:true if source maps are enabled