From d64ea23e114eeb3790b15a867d5aabd31e8dd9eb Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 17 May 2024 17:01:49 +0700 Subject: [PATCH] Enable svelte preprocess --- ts/svelte.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(