From 98ca6e5a875e579965d8f8c8b2cc9ef3578b7403 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Sat, 28 Mar 2026 20:02:41 -0600 Subject: [PATCH 1/2] fix issues with minify feature --- src/minify.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/minify.ts b/src/minify.ts index 28ebad1f..3859c7d6 100644 --- a/src/minify.ts +++ b/src/minify.ts @@ -10,7 +10,7 @@ type Log = (str: string) => void; const htmlMinifierOptions = { caseSensitive: true, collapseBooleanAttributes: true, - collapseWhitespace: true, + collapseWhitespace: false, decodeEntities: true, html5: true, minifyCSS: true, @@ -31,10 +31,8 @@ const cleanCss = new CleanCSS({ level: 2 }); const svgoConfig: SvgoConfig = { multipass: true, plugins: [ - { - name: 'preset-default', - params: { overrides: { removeViewBox: false } }, - } as PluginConfig, + { name: 'preset-default' }, + 'removeViewBox', ], }; From abe5763085626807bd77936ee1a9eb5984f3d977 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Sat, 28 Mar 2026 20:26:00 -0600 Subject: [PATCH 2/2] fix lint --- src/minify.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/minify.ts b/src/minify.ts index 3859c7d6..ffe477b7 100644 --- a/src/minify.ts +++ b/src/minify.ts @@ -1,6 +1,6 @@ import { minify as htmlMinify } from 'html-minifier-terser'; import * as CleanCSS from 'clean-css'; -import { optimize as svgoOptimize, type Config as SvgoConfig, type PluginConfig } from 'svgo'; +import { optimize as svgoOptimize, type Config as SvgoConfig } from 'svgo'; import { minify as terserMinify } from 'terser'; import * as path from 'path'; @@ -30,10 +30,7 @@ const cleanCss = new CleanCSS({ level: 2 }); const svgoConfig: SvgoConfig = { multipass: true, - plugins: [ - { name: 'preset-default' }, - 'removeViewBox', - ], + plugins: [{ name: 'preset-default' }, 'removeViewBox'], }; export async function minifyGeneratedFiles(