-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.ts
31 lines (26 loc) · 986 Bytes
/
next.config.ts
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 [test, development, production] = ["https://dev.waverd.com", "http://localhost:8081", "https://api.waverd.com"];
const STABLE_VERSION = "/v1",
INIT_NODE_ENV = process.env.NODE_ENV,
SERVER_ENV_URLS = { test, development, production },
DOMAINS = ["apihub", "games", "console", "accounts"],
BASE_URL = SERVER_ENV_URLS[INIT_NODE_ENV] + STABLE_VERSION;
const nextConfig: NextConfig = {
async redirects() {
return DOMAINS.map((domain) => ({
permanent: false,
source: "/:path*",
destination: `https://www.waverd.com/${domain}/:path*`,
has: [{ type: "host", value: `${domain}.waverd.com` }],
}));
},
env: {
BASE_URL,
STABLE_VERSION,
NOTICE_PERIOD: "30",
INACTIVITY_PERIOD: "21",
DATA_DELETION_PERIOD_PERIOD: "14",
},
};
const withBundleAnalyzer = require("@next/bundle-analyzer")({ enabled: process.env.ANALYZE === "true" });
module.exports = withBundleAnalyzer(nextConfig);