-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Memet Zx <[email protected]>
- Loading branch information
Showing
1 changed file
with
8 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
import adapter from "@sveltejs/adapter-static"; | ||
import { vitePreprocess } from "@sveltejs/kit/vite"; | ||
import adapter from '@sveltejs/adapter-auto'; | ||
|
||
/** @type {import('@sveltejs/kit').Config} */ | ||
const config = { | ||
kit: { | ||
adapter: adapter(), | ||
paths: { | ||
base: "/tools" | ||
}, | ||
prerender: { | ||
handleHttpError: ({ path, referrer, message }) => { | ||
// Ignore deliberate link to shiny 404 page | ||
if (path === '/404' && referrer === '/tools/error') { | ||
return; | ||
} | ||
|
||
// Otherwise fail the build | ||
throw new Error(message); | ||
} | ||
} | ||
}, | ||
preprocess: vitePreprocess() | ||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. | ||
// If your environment is not supported or you settled on a specific environment, switch out the adapter. | ||
// See https://kit.svelte.dev/docs/adapters for more information about adapters. | ||
adapter: adapter() | ||
} | ||
}; | ||
|
||
export default config; |