2022-03-23 18:34:23 -04:00
|
|
|
import bundleAnalyzer from "@next/bundle-analyzer"
|
2022-03-08 02:09:30 -05:00
|
|
|
|
2022-03-06 19:46:59 -05:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const nextConfig = {
|
2022-04-10 23:05:42 -04:00
|
|
|
reactStrictMode: true,
|
|
|
|
experimental: {
|
2023-05-20 18:41:53 -04:00
|
|
|
appDir: true
|
2022-04-10 23:05:42 -04:00
|
|
|
},
|
2022-12-18 02:09:47 -05:00
|
|
|
rewrites() {
|
2022-12-04 17:49:18 -05:00
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: "/file/raw/:id",
|
|
|
|
destination: `/api/raw/:id`
|
2023-07-20 21:04:47 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
source: "/signout",
|
|
|
|
destination: `/api/auth/signout`
|
2023-05-20 18:41:53 -04:00
|
|
|
}
|
2022-12-04 17:49:18 -05:00
|
|
|
]
|
2022-12-25 23:00:26 -05:00
|
|
|
},
|
|
|
|
images: {
|
|
|
|
domains: ["avatars.githubusercontent.com"]
|
2023-01-12 23:50:56 -05:00
|
|
|
},
|
|
|
|
env: {
|
2023-07-20 21:04:47 -04:00
|
|
|
NEXT_PUBLIC_DRIFT_URL:
|
|
|
|
process.env.DRIFT_URL ||
|
|
|
|
(process.env.VERCEL_URL
|
|
|
|
? `https://${process.env.VERCEL_URL}`
|
|
|
|
: "http://localhost:3000")
|
|
|
|
},
|
|
|
|
eslint: {
|
|
|
|
ignoreDuringBuilds: process.env.VERCEL_ENV !== "production"
|
|
|
|
},
|
|
|
|
typescript: {
|
|
|
|
ignoreBuildErrors: process.env.VERCEL_ENV !== "production"
|
|
|
|
},
|
|
|
|
modularizeImports: {
|
|
|
|
"react-feather": {
|
|
|
|
transform: "react-feather/dist/icons/{{kebabCase member}}"
|
|
|
|
}
|
2023-02-24 02:56:13 -05:00
|
|
|
}
|
2022-03-23 18:34:23 -04:00
|
|
|
}
|
2022-03-06 19:46:59 -05:00
|
|
|
|
2023-07-20 21:04:47 -04:00
|
|
|
export default process.env.ANALYZE === "true"
|
|
|
|
? bundleAnalyzer({ enabled: true })(nextConfig)
|
|
|
|
: nextConfig
|