fix: resolve two build errors blocking deploy
1. Replace stale supabase import with api in sweet-corn-box page — src/lib/supabase.ts was removed when migrating to better-auth. 2. Stub bun-sqlite-dialect from @better-auth/kysely-adapter via webpack alias — it imports DEFAULT_MIGRATION_TABLE which doesn't exist in kysely 0.29.x and is never used (we use PostgresDialect, not bun-sqlite). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user