CoastalCommitsPastes/next.config.mjs

35 lines
682 B
JavaScript
Raw Normal View History

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 = {
reactStrictMode: true,
experimental: {
2022-11-08 22:14:43 -08:00
// esmExternals: true,
appDir: true,
serverComponentsExternalPackages: ["prisma", "@prisma/client"]
},
2022-12-04 14:49:18 -08:00
output: "standalone",
rewrites() {
2022-12-04 14:49:18 -08:00
return [
{
source: "/file/raw/:id",
destination: `/api/raw/:id`
},
{
source: "/home",
destination: "/"
}
]
},
images: {
domains: ["avatars.githubusercontent.com"]
},
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
export default bundleAnalyzer({ enabled: process.env.ANALYZE === "true" })(
nextConfig
2022-03-23 15:34:23 -07:00
)