LukaHarambasic / harambasic.de

My personal website build with SvelteKit
https://harambasic.de
7 stars 1 forks source link

check if I wanna use it: #137

Open github-actions[bot] opened 1 year ago

github-actions[bot] commented 1 year ago

check if I wanna use it:

https://github.com/LukaHarambasic/harambasic.de/blob/78447245dd5207b3ca37186ce8af4711652a1c6d/svelte.config.js#L8


import adapter from '@sveltejs/adapter-static'
import { vitePreprocess } from '@sveltejs/kit/vite'

/** @type {import('@sveltejs/kit').Config} */
const config = {
  // Consult https://kit.svelte.dev/docs/integrations#preprocessors
  // for more information about preprocessors
  // TODO check if I wanna use it:
  preprocess: [vitePreprocess({ postcss: true })],
  kit: {
    adapter: adapter(),
    prerender: {
      handleHttpError: ({ path, status, message }) => {
        console.log(status, path, message)
        if (status === 404) {
          return
        }

        // otherwise fail the build
        throw new Error(message)
      }
    }
  }
}

export default config

2c7180ebd32e0e2cda83f79152afa961e0da5b28