mirror of
https://github.com/chaitin/SafeLine.git
synced 2026-02-11 11:13:40 +08:00
36 lines
706 B
JavaScript
36 lines
706 B
JavaScript
const isProduction = process.env.NODE_ENV == "production";
|
|
const isDevelopment = process.env.NODE_ENV == "development";
|
|
|
|
const prodConfig = {
|
|
output: "export",
|
|
};
|
|
|
|
const devConfig = {
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/api/poc/:path*",
|
|
destination: "https://waf-ce.chaitin.cn/api/poc/:path*",
|
|
},
|
|
{
|
|
source: "/api/count",
|
|
destination: "https://waf-ce.chaitin.cn/api/count",
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: false,
|
|
images: { unoptimized: true },
|
|
};
|
|
|
|
Object.assign(
|
|
nextConfig,
|
|
isProduction && prodConfig,
|
|
isDevelopment && devConfig
|
|
);
|
|
|
|
module.exports = nextConfig;
|