31 lines
597 B
JavaScript
31 lines
597 B
JavaScript
import bundleAnalyzer from "@next/bundle-analyzer"
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
experimental: {
|
|
// esmExternals: true,
|
|
appDir: true,
|
|
serverComponentsExternalPackages: ["prisma", "@prisma/client"]
|
|
},
|
|
output: "standalone",
|
|
rewrites() {
|
|
return [
|
|
{
|
|
source: "/file/raw/:id",
|
|
destination: `/api/raw/:id`
|
|
},
|
|
{
|
|
source: "/home",
|
|
destination: "/"
|
|
}
|
|
]
|
|
},
|
|
images: {
|
|
domains: ["avatars.githubusercontent.com"]
|
|
}
|
|
}
|
|
|
|
export default bundleAnalyzer({ enabled: process.env.ANALYZE === "true" })(
|
|
nextConfig
|
|
)
|