diff --git a/next.config.ts b/next.config.ts index 541dabe..e5537eb 100644 --- a/next.config.ts +++ b/next.config.ts @@ -121,6 +121,18 @@ const nextConfig: NextConfig = { ]; }, + // Stub out bun-sqlite dialect bundled inside @better-auth/kysely-adapter. + // It imports kysely migration symbols that don't exist in kysely 0.29.x and + // is never used at runtime (we use PostgresDialect). Aliasing to false + // makes webpack treat it as an empty module. + webpack(config) { + config.resolve.alias = { + ...config.resolve.alias, + "@better-auth/kysely-adapter/dist/bun-sqlite-dialect-DzNwOpKv.mjs": false, + }; + return config; + }, + // Experimental features experimental: { // Enable optimizePackageImports for better bundle size diff --git a/src/app/tuxedo/products/sweet-corn-box/page.tsx b/src/app/tuxedo/products/sweet-corn-box/page.tsx index caa03d2..71aaa99 100644 --- a/src/app/tuxedo/products/sweet-corn-box/page.tsx +++ b/src/app/tuxedo/products/sweet-corn-box/page.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next"; import { Fraunces, JetBrains_Mono } from "next/font/google"; -import { supabase } from "@/lib/supabase"; +import { api } from "@/lib/api"; import { getBrandSettingsPublic } from "@/actions/brand-settings"; import SweetCornProductPage from "@/components/storefront/SweetCornProductPage"; @@ -77,7 +77,7 @@ export default async function SweetCornBoxPage() { try { const [brandRes, settingsRes] = await Promise.all([ - supabase.from("brands").select("id, name").eq("slug", BRAND_SLUG).single(), + api.from("brands").select("id, name").eq("slug", BRAND_SLUG).single(), getBrandSettingsPublic(BRAND_SLUG), ]); if (brandRes.data) {