diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/hooks.server.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/src/hooks.server.ts b/app/src/hooks.server.ts index bf7121a..3abdfb3 100644 --- a/app/src/hooks.server.ts +++ b/app/src/hooks.server.ts @@ -1,5 +1,5 @@ -import { minify } from 'html-minifier-terser'; -import { building } from '$app/environment'; +import { minify } from 'html-minifier-terser' +import { building } from '$app/environment' const minification_options = { collapseBooleanAttributes: true, @@ -18,19 +18,19 @@ const minification_options = { removeScriptTypeAttributes: true, removeStyleLinkTypeAttributes: true, sortAttributes: true, - sortClassName: true -}; + sortClassName: true, +} /** @type {import('@sveltejs/kit').Handle} */ export async function handle({ event, resolve }) { - let page = ''; + let page = '' return resolve(event, { transformPageChunk: ({ html, done }) => { - page += html; + page += html if (done) { - return building ? minify(page, minification_options) : page; + return building ? minify(page, minification_options) : page } - } - }); + }, + }) } |