mirror of
https://github.com/Xevion/xevion.dev.git
synced 2026-01-31 06:26:44 -06:00
Track page views, project interactions, theme changes, external links, PGP actions, and errors. Console logging in dev when PostHog not configured. Requires PUBLIC_POSTHOG_KEY and PUBLIC_POSTHOG_HOST env vars.
31 lines
722 B
JavaScript
31 lines
722 B
JavaScript
import adapter from "svelte-adapter-bun";
|
|
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
preprocess: vitePreprocess(),
|
|
inlineStyleThreshold: 2000,
|
|
kit: {
|
|
adapter: adapter({
|
|
out: "build",
|
|
precompress: false,
|
|
serveAssets: false,
|
|
}),
|
|
alias: {
|
|
$components: "src/lib/components",
|
|
},
|
|
paths: {
|
|
relative: false, // Required for PostHog session replay with SSR
|
|
},
|
|
prerender: {
|
|
handleHttpError: ({ path, referrer, message }) => {
|
|
console.log(
|
|
`Prerender error for ${path} (from ${referrer}): ${message}`,
|
|
);
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|