From 9fbe8b79f7bc12a71b62722b06f7e93334da1a52 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Mon, 2 Jan 2023 01:18:28 -0500 Subject: UI builds and embeds just fine, it mostly works. Still need to address routing all requests to index.html inside of the Go handler, shouldn't be too hard. --- ui/svelte.config.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'ui/svelte.config.js') diff --git a/ui/svelte.config.js b/ui/svelte.config.js index 87f198f..af0aad6 100644 --- a/ui/svelte.config.js +++ b/ui/svelte.config.js @@ -1,4 +1,6 @@ -import adapter from '@sveltejs/adapter-auto'; +// svelte.config.js +// import adapter from '@sveltejs/adapter-auto'; +import adapter from '@sveltejs/adapter-static'; import { vitePreprocess } from '@sveltejs/kit/vite'; /** @type {import('@sveltejs/kit').Config} */ @@ -8,8 +10,23 @@ const config = { preprocess: vitePreprocess(), kit: { - adapter: adapter() + adapter: adapter({ + fallback: 'index.html', + trailingSlash: 'always' + }), + + prerender: { entries: [] } } }; export default config; + +// import adapter from '@sveltejs/adapter-static'; +// export default { +// kit: { +// adapter: adapter({ +// fallback: '200.html' +// }), +// prerender: { entries: [] } +// } +// }; -- cgit v1.2.3