Skip to content

Commit

Permalink
Add conditional to set the base for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
johngribbin committed Dec 19, 2024
1 parent 50fc96d commit 765b96a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 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 dev = process.env.NODE_ENV === 'development'

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
Expand All @@ -11,6 +13,9 @@ const config = {
adapter: adapter({
fallback: '200.html'
}),
paths: {
base: dev ? '' : '/Remote' // Use '/Remote' for GitHub Pages
},
csp: {
mode: 'auto',
directives: {
Expand Down

0 comments on commit 765b96a

Please sign in to comment.