diff --git a/ts/svelte.config.js b/ts/svelte.config.js index 948fa290e..72ad1628e 100644 --- a/ts/svelte.config.js +++ b/ts/svelte.config.js @@ -2,6 +2,7 @@ import adapter from "@sveltejs/adapter-static"; import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; import { dirname, join } from "path"; import { fileURLToPath } from "url"; +import preprocess from 'svelte-preprocess'; // This prevents errors being shown when opening VSCode on the root of the // project, instead of the ts folder. @@ -9,7 +10,8 @@ const tsFolder = dirname(fileURLToPath(import.meta.url)); /** @type {import('@sveltejs/kit').Config} */ const config = { - preprocess: vitePreprocess(), + // preprocess() slows things down by about 10%, but allows us to use :global { ... } + preprocess: [vitePreprocess(), preprocess()], kit: { adapter: adapter(