-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnext.config.ts
More file actions
31 lines (28 loc) · 970 Bytes
/
next.config.ts
File metadata and controls
31 lines (28 loc) · 970 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
webpack: config => {
config.externals.push('pino-pretty', 'lokijs', 'encoding')
return config
},
env: {
NOTLINK_BACKEND_HOST: process.env.NOTLINK_BACKEND_HOST,
NOTLINK_UI_HOST: process.env.NOTLINK_UI_HOST,
THIRDWEB_CLIENT_ID: process.env.THIRDWEB_CLIENT_ID,
THIRDWEB_SECRET_KEY: process.env.THIRDWEB_SECRET_KEY,
TURNSTILE_SITE_KEY: process.env.TURNSTILE_SITE_KEY,
TURNSTILE_SECRET_KEY: process.env.TURNSTILE_SECRET_KEY,
WHICH_NODE_ENV: process.env.WHICH_NODE_ENV,
DOMAIN_NAME: process.env.DOMAIN_NAME,
},
async rewrites() {
return [
{
// Match any URL that isn’t handled by Next.js (e.g. excluding /api, /_next, etc.)
source: '/:short_code((?!api|_next|static).*)',
destination: `${process.env.NOTLINK_BACKEND_HOST}/:short_code`,
},
]
},
};
export default nextConfig;