2022-03-23 15:34:23 -07:00
|
|
|
import bundleAnalyzer from "@next/bundle-analyzer"
|
2022-03-07 23:09:30 -08:00
|
|
|
|
2022-03-06 16:46:59 -08:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const nextConfig = {
|
2022-04-10 20:05:42 -07:00
|
|
|
reactStrictMode: true,
|
|
|
|
experimental: {
|
2022-11-08 22:14:43 -08:00
|
|
|
// esmExternals: true,
|
2022-12-17 16:22:29 -08:00
|
|
|
appDir: true,
|
2022-12-25 20:00:26 -08:00
|
|
|
serverComponentsExternalPackages: ["prisma", "@prisma/client"]
|
2022-04-10 20:05:42 -07:00
|
|
|
},
|
2022-12-04 14:49:18 -08:00
|
|
|
output: "standalone",
|
2022-12-17 23:09:47 -08:00
|
|
|
rewrites() {
|
2022-12-04 14:49:18 -08:00
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: "/file/raw/:id",
|
|
|
|
destination: `/api/raw/:id`
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: "/home",
|
|
|
|
destination: "/"
|
|
|
|
}
|
|
|
|
]
|
2022-12-25 20:00:26 -08:00
|
|
|
},
|
|
|
|
images: {
|
|
|
|
domains: ["avatars.githubusercontent.com"]
|
2023-01-12 20:50:56 -08:00
|
|
|
},
|
|
|
|
env: {
|
|
|
|
NEXT_PUBLIC_DRIFT_URL: process.env.VERCEL_URL || process.env.DRIFT_URL
|
2022-12-04 14:49:18 -08:00
|
|
|
}
|
2022-03-23 15:34:23 -07:00
|
|
|
}
|
2022-03-06 16:46:59 -08:00
|
|
|
|
2022-03-21 20:30:45 -07:00
|
|
|
export default bundleAnalyzer({ enabled: process.env.ANALYZE === "true" })(
|
2022-04-10 20:05:42 -07:00
|
|
|
nextConfig
|
2022-03-23 15:34:23 -07:00
|
|
|
)
|