From 9af1854a7e35785a8e86426c4fb1edd465f164a3 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Thu, 1 Jan 2026 18:32:49 -0800 Subject: Massive refactor courtesy of 5 dollars of AI tokens --- svelte.config.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'svelte.config.js') diff --git a/svelte.config.js b/svelte.config.js index 3f578a3..efa0e4b 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,25 +1,23 @@ import adapter from '@sveltejs/adapter-node'; -import preprocess from 'svelte-preprocess'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; /** @type {import('@sveltejs/kit').Config} */ const config = { - // Consult https://github.com/sveltejs/svelte-preprocess - // for more information about preprocessors - preprocess: preprocess(), + // Use vitePreprocess with script preprocessing enabled for TypeScript support + preprocess: vitePreprocess({ script: true }), kit: { - adapter: adapter() - }, - - csp: { - mode: 'auto', - directives: { - 'script-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'], - 'frame-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'], - 'style-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'], - 'connect-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'], - } - }, + adapter: adapter(), + csp: { + mode: 'auto', + directives: { + 'script-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'], + 'frame-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'], + 'style-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'], + 'connect-src': ['self', 'https://hcaptcha.com', 'https://*.hcaptcha.com'] + } + } + } }; export default config; -- cgit v1.2.3-70-g09d2