From e2f3dbff18f5eabdb632c59eb6b6b6bc2462895a Mon Sep 17 00:00:00 2001 From: apt-get Date: Tue, 17 Mar 2026 01:04:34 +0100 Subject: [PATCH] test again... --- src/routes/streams/[stream_id]/StreamPage.svelte | 11 ++++------- vite.config.ts | 7 +++++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/routes/streams/[stream_id]/StreamPage.svelte b/src/routes/streams/[stream_id]/StreamPage.svelte index 387c958..dd7d826 100644 --- a/src/routes/streams/[stream_id]/StreamPage.svelte +++ b/src/routes/streams/[stream_id]/StreamPage.svelte @@ -2,15 +2,12 @@ import { getStreamContext } from '$lib/streamContext.svelte.ts'; import { shorthandCode, formatTrackTime, formatDate } from '$lib/utils.ts'; import { jumpToTrack } from './Player.svelte'; - import { browser } from '$app/environment'; import { Carta } from 'carta-md'; + import DOMPurify from 'isomorphic-dompurify'; - let carta = $state(new Carta()); - if (browser) { - import('isomorphic-dompurify').then(({ default: DOMPurify }) => { - carta = new Carta({ sanitizer: DOMPurify.sanitize }); - }); - } + const carta = new Carta({ + sanitizer: DOMPurify.sanitize + }); const ctx = getStreamContext(); diff --git a/vite.config.ts b/vite.config.ts index a3eb481..cf1c68f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,5 +2,8 @@ import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; export default defineConfig({ - plugins: [sveltekit()] -}); + plugins: [sveltekit()], + ssr: { + noExternal: [], + external: ['carta-md', 'isomorphic-dompurify'] + }