-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
38 lines (35 loc) · 979 Bytes
/
next.config.mjs
File metadata and controls
38 lines (35 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
let withBundleAnalyzer = (config) => config
if (process.env.ANALYZE === "true") {
try {
const { default: bundleAnalyzer } = await import("@next/bundle-analyzer")
withBundleAnalyzer = bundleAnalyzer({ enabled: true })
} catch (error) {
console.warn("Missing @next/bundle-analyzer. Install it to enable bundle analysis.", error)
}
}
/** @type {import('next').NextConfig} */
const nextConfig = {
typescript: {
ignoreBuildErrors: true,
},
images: {
unoptimized: true,
},
output: "standalone",
serverExternalPackages: ["@prisma/client", "prisma"],
compiler: {
removeConsole:
process.env.NODE_ENV === "production"
? {
exclude: ["error"],
}
: false,
},
experimental: {
optimizePackageImports: ["lucide-react", "framer-motion"],
},
env: {
NEXT_PUBLIC_BUILD_TIME: process.env.NEXT_PUBLIC_BUILD_TIME || new Date().toISOString(),
},
}
export default withBundleAnalyzer(nextConfig)