Skip to content

Commit 84fdea2

Browse files
committed
Add initial Next.js configuration with environment variables and API rewrites
1 parent 3a04a9c commit 84fdea2

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

frontend/next.config.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
/* config options here */
4+
reactStrictMode: true,
5+
swcMinify: true,
6+
output: 'export',
7+
images: {
8+
unoptimized: true,
9+
},
10+
env: {
11+
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000',
12+
},
13+
rewrites: async () => {
14+
return {
15+
beforeFiles: [
16+
{
17+
source: '/api/:path*',
18+
destination: `${process.env.NEXT_PUBLIC_API_URL}/:path*`,
19+
},
20+
],
21+
};
22+
},
523
};
624

725
export default nextConfig;

0 commit comments

Comments
 (0)