mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
The lint rule allows console.warn (allow: [warn, error]) but removeConsole only excluded error, so approved console.warn calls were silently dropped from production bundles. Add warn to the exclude list so the prod strip and the lint allow-list agree; only console.log/debug/info are stripped now, warn and error both survive (verified: warn 85 to 85, error 906 to 906, log 675 to 14).
27 lines
749 B
JavaScript
27 lines
749 B
JavaScript
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const nextConfig = {
|
|
output: "export",
|
|
compiler: {
|
|
removeConsole: process.env.NODE_ENV === "production" ? { exclude: ["error", "warn"] } : false,
|
|
},
|
|
// Required with output: "export" — default image optimizer runs only in server mode.
|
|
// See https://nextjs.org/docs/messages/export-image-api
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
basePath: "",
|
|
assetPrefix: "/litellm-asset-prefix",
|
|
trailingSlash: true,
|
|
turbopack: {
|
|
// Must be absolute; "." is no longer allowed
|
|
root: __dirname,
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|