Files
frontend/apps/dm_new/next.config.ts
T

58 lines
1.3 KiB
TypeScript

import type { NextConfig } from "next";
// import path from "path";
const subDomain =
process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000";
const nextConfig: NextConfig = {
output: "standalone",
experimental: {
proxyTimeout: 600000,
},
// // 🔥 반드시 필요
// webpack(config) {
// config.resolve.alias = {
// ...(config.resolve.alias || {}),
// // monorepo 구조 기준
// "@common": path.resolve(__dirname, "../../packages/common"),
// };
// return config;
// },
async rewrites() {
return {
beforeFiles: [
{
source: "/_next/static/:path*",
destination: `${subDomain}/_next/static/:path*`,
has: [
{
type: "header",
key: "referer",
value: "(.*)/pst(.*)",
},
],
},
],
afterFiles: [
{
source: "/sewerage-service/:path*",
destination: `${subDomain}/sewerage-service/:path*`,
},
{
source: "/reuse-service/:path*",
destination: `${subDomain}/reuse-service/:path*`,
},
{
source: "/operation-service/:path*",
destination: `${subDomain}/operation-service/:path*`,
},
],
fallback: [],
};
},
};
export default nextConfig;