From e55f4c2fe8a6e1d62a0b005777b46c80e360d37e Mon Sep 17 00:00:00 2001 From: memdmp Date: Thu, 31 Jul 2025 22:48:01 +0200 Subject: feat: initial commit --- svelte.config.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 svelte.config.js (limited to 'svelte.config.js') diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 0000000..0568a73 --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,30 @@ +import adapter from '@sveltejs/adapter-static'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; +import importMap from './import_map.json' with { type: 'json' }; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + preprocess: vitePreprocess(), + kit: { + paths: { + base: '', + }, + adapter: adapter({ + fallback: '404.html', + }), + alias: Object.fromEntries( + Object.entries(importMap.imports) + .filter(([k]) => k !== '$lib' && k !== '$lib/') + .map(([k, v]) => + v.startsWith('npm:') + ? 'npm:' + k === v + ? [] + : [k, 'node_modules/' + v.substring(4)] + : [k, v], + ) + .filter((v) => v.length !== 0), + ), + }, +}; + +export default config; -- cgit v1.2.3