diff --git a/next.config.js b/next.config.js index 0e5fc82..fb5dac9 100644 --- a/next.config.js +++ b/next.config.js @@ -1,8 +1,12 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - experimental: { - // hier können andere gültige experimentelle Optionen stehen, falls nötig - }, -}; +// next.config.js +const path = require('path'); +const withFlowbiteReact = require('flowbite-react/plugin/nextjs'); -module.exports = nextConfig; +const nextConfig = { + output: 'export', + images: { unoptimized: true }, + webpack: (config) => { + config.resolve.alias['@'] = path.resolve(process.cwd()); + return config; + }, +}; \ No newline at end of file diff --git a/next.config.mjs b/next.config.mjs index 583dc3a..316d872 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -3,6 +3,8 @@ import path from "path"; import withFlowbiteReact from "flowbite-react/plugin/nextjs"; const nextConfig = { + output: "export", + images: { unoptimized: true }, webpack: (config) => { config.resolve.alias["@"] = path.resolve(process.cwd()); return config; diff --git a/pages/api/track.js b/pages/api/track.js index d8ddd06..6256ef8 100644 --- a/pages/api/track.js +++ b/pages/api/track.js @@ -1,23 +1,23 @@ -// pages/api/track.js -import { PostHogClient } from "@/lib/posthog"; - -export default async function handler(req, res) { - const posthog = PostHogClient(); - - try { - const { event, properties, distinctId } = req.body; - - await posthog.capture({ - distinctId: distinctId || "server_event", - event: event || "default_event", - properties: properties || {}, - }); - - await posthog.shutdown(); - - return res.status(200).json({ success: true }); - } catch (error) { - console.error("PostHog error:", error); - return res.status(500).json({ success: false, error: error.message }); - } -} +// pages/api/track.js +import { PostHogClient } from "@/lib/posthog"; + +export default async function handler(req, res) { + const posthog = PostHogClient(); + + try { + const { event, properties, distinctId } = req.body; + + await posthog.capture({ + distinctId: distinctId || "server_event", + event: event || "default_event", + properties: properties || {}, + }); + + await posthog.shutdown(); + + return res.status(200).json({ success: true }); + } catch (error) { + console.error("PostHog error:", error); + return res.status(500).json({ success: false, error: error.message }); + } +} diff --git a/pages/demo.jsx b/pages/demo.jsx deleted file mode 100644 index bcc4f23..0000000 --- a/pages/demo.jsx +++ /dev/null @@ -1,32 +0,0 @@ -// pages/demo.jsx -import React from "react"; -import FontCard from "@/components/ui/FontCard"; // Default‑Import -import { fonts } from "@/lib/fonts"; - -export default function Demo() { - // Absicherung gegen undefined beim SSR - const robotoClass = fonts.roboto?.className || ""; - - return ( -
- {/* 1. next/font (voll integriert) */} -

- Roboto aus next/font -

- - {/* 2. Tailwind‑Utility aus Map */} -

- Dieselbe Font via font-montserrat -

- - {/* 3. Deine Preview‑Komponente */} - -
- ); -}