diff options
author | Matt Strapp <matt@mattstrapp.net> | 2023-09-29 10:11:33 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2023-09-29 10:11:33 -0500 |
commit | 11ece69e006b446b9ca4e06eb5af5662bc811469 (patch) | |
tree | 29dbb0b4b88aa9eae29d80f5ebc08b8f710f51f8 /app/src/hooks.server.ts | |
parent | Update dep + fix build (diff) | |
download | trinkets-11ece69e006b446b9ca4e06eb5af5662bc811469.tar trinkets-11ece69e006b446b9ca4e06eb5af5662bc811469.tar.gz trinkets-11ece69e006b446b9ca4e06eb5af5662bc811469.tar.bz2 trinkets-11ece69e006b446b9ca4e06eb5af5662bc811469.tar.lz trinkets-11ece69e006b446b9ca4e06eb5af5662bc811469.tar.xz trinkets-11ece69e006b446b9ca4e06eb5af5662bc811469.tar.zst trinkets-11ece69e006b446b9ca4e06eb5af5662bc811469.zip |
Formatting
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
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 } - } - }); + }, + }) } |