Skip to content

Commit

Permalink
fix: set correct basepath
Browse files Browse the repository at this point in the history
  • Loading branch information
DerStimmler committed Aug 26, 2023
1 parent 71b8f61 commit 670bfb0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
retention-days: 30

deploy-demo:
name: Deploy demo
name: Deploy app
runs-on: ubuntu-latest
needs: build
permissions:
Expand Down
3 changes: 2 additions & 1 deletion src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import { goto } from '$app/navigation';
import { base } from '$app/paths';
goto('/');
goto(`${base}/`);
</script>
7 changes: 6 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';

const isProduction = process.env.NODE_ENV === 'production';

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
Expand All @@ -16,7 +18,10 @@ const config = {
fallback: undefined,
precompress: false,
strict: true
})
}),
paths: {
base: isProduction ? '/stromgedacht-web' : ''
}
}
};

Expand Down

0 comments on commit 670bfb0

Please sign in to comment.