import type { NextConfig } from "next"; import createNextIntlPlugin from "next-intl/plugin"; const nextConfig: NextConfig = { // This app lives inside the Laravel repo tree (which has its own lockfiles); // pin the Turbopack root so Next doesn't infer a parent directory. turbopack: { root: import.meta.dirname }, // Prisma + the MariaDB driver adapter are native/server-only — keep them out // of the bundle (same approach as the habbo-next reference). serverExternalPackages: ["@prisma/adapter-mariadb", "mariadb", "@prisma/client"], }; // next-intl WITHOUT i18n routing — locale comes from the NEXT_LOCALE cookie via // src/i18n/request.ts, so URLs and the access-guard middleware stay unchanged. const withNextIntl = createNextIntlPlugin("./src/i18n/request.ts"); export default withNextIntl(nextConfig);