Skip to content

Commit e1b4741

Browse files
committed
fix: disable rewrites for prod
1 parent e37443d commit e1b4741

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ FROM node:24-alpine AS builder
1919
WORKDIR /app
2020
COPY . .
2121

22+
# Set NODE_ENV to production for build
23+
ENV NODE_ENV=production
24+
2225
# Accept build arguments for NEXT_PUBLIC environment variables
2326
ARG NEXT_PUBLIC_APP_URL
2427
ENV NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL

next.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const nextConfig: NextConfig = {
2020
reactCompiler: true,
2121

2222
rewrites: async () => {
23+
if (process.env.NODE_ENV === 'production') {
24+
return []
25+
}
2326
return [
2427
{
2528
source: '/api/:path*',

0 commit comments

Comments
 (0)