From 7216a48f4e97866e0c6d090d862905c657f86611 Mon Sep 17 00:00:00 2001 From: Alex <$(pass /github/email)> Date: Sat, 1 Mar 2025 11:42:50 +0100 Subject: [PATCH] added paths to svelte.config --- frontend/svelte.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js index 0e52b35..1120235 100644 --- a/frontend/svelte.config.js +++ b/frontend/svelte.config.js @@ -1,12 +1,17 @@ import adapter from '@sveltejs/adapter-node'; +const isProduction = process.env.NODE_ENV === 'production'; + /** @type {import('@sveltejs/kit').Config} */ const config = { kit: { // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter() + adapter: adapter(), + paths: { + base: isProduction ? '/backend' : '' + } } };