Skip to content

Commit 8b5d360

Browse files
committed
fix: Remove static export config for API routes compatibility
1 parent daafbcc commit 8b5d360

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

next.config.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
output: 'export',
3+
// Removed 'output: export' - Now using full Next.js with API routes
44
images: {
5-
unoptimized: true,
5+
remotePatterns: [
6+
{
7+
protocol: 'https',
8+
hostname: '**',
9+
},
10+
],
11+
},
12+
// Server-side rendering enabled for Vercel deployment
13+
experimental: {
14+
serverActions: {
15+
bodySizeLimit: '2mb',
16+
},
617
},
7-
// Chỉ sử dụng basePath khi deploy lên GitHub Pages với repo name
8-
// Nếu dùng custom domain hoặc username.github.io thì comment dòng này
9-
// basePath: '/your-repo-name',
10-
// assetPrefix: '/your-repo-name/',
11-
trailingSlash: true,
1218
}
1319

1420
module.exports = nextConfig

0 commit comments

Comments
 (0)