diff --git a/src/minify.ts b/src/minify.ts index 28ebad1f..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'; @@ -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, @@ -30,12 +30,7 @@ const cleanCss = new CleanCSS({ level: 2 }); const svgoConfig: SvgoConfig = { multipass: true, - plugins: [ - { - name: 'preset-default', - params: { overrides: { removeViewBox: false } }, - } as PluginConfig, - ], + plugins: [{ name: 'preset-default' }, 'removeViewBox'], }; export async function minifyGeneratedFiles(