Files
frontend/docs/dockerbuild/next.config.ts
T

39 lines
931 B
TypeScript

import type { NextConfig } from "next";
const subDomain =
process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13000";
const nextConfig: NextConfig = {
output: 'standalone', // docker image shrink
compress: true, // 기본값 true지만 명시 web browser request zip format
async rewrites() {
return [
{
source: '/_next/static/:path*.js',
destination: '/_next/static/:path*.js.gz',
has: [
{
type: 'header',
key: 'accept-encoding',
value: '.*gzip.*',
},
],
},
]
},
async headers() {
return [
{
source: '/_next/static/:path*.js.gz',
headers: [
{ key: 'Content-Encoding', value: 'gzip' },
{ key: 'Content-Type', value: 'application/javascript' },
{ key: 'Vary', value: 'Accept-Encoding' },
],
},
]
},
};
export default nextConfig;