Skip to content

Commit

Permalink
try to fix error
Browse files Browse the repository at this point in the history
Signed-off-by: Memet Zx <[email protected]>
  • Loading branch information
Zxce3 committed Jan 30, 2024
1 parent 97cf175 commit f8d568f
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions svelte.config.js
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;

0 comments on commit f8d568f

Please sign in to comment.