next.config.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import type { NextConfig } from "next";
  2. const nextConfig: NextConfig = {
  3. /* config options here */
  4. reactStrictMode: false,
  5. productionBrowserSourceMaps: true,
  6. // CI build does not block on lint; run `npm run lint` as a separate stage if needed.
  7. eslint: {
  8. ignoreDuringBuilds: true
  9. },
  10. images: {
  11. remotePatterns: [
  12. {
  13. protocol: "https",
  14. hostname: "localhost",
  15. port: "4000",
  16. pathname: "/uploads/**"
  17. },
  18. {
  19. protocol: "https",
  20. hostname: "api.antooza.com",
  21. pathname: "/uploads/**"
  22. },
  23. {
  24. protocol: "https",
  25. hostname: "resource.antooza.com",
  26. pathname: "/uploads/**"
  27. },
  28. {
  29. protocol: "https",
  30. hostname: "img.youtube.com"
  31. },
  32. {
  33. protocol: "https",
  34. hostname: "yt3.ggpht.com"
  35. },
  36. {
  37. protocol: "https",
  38. hostname: "yt3.googleusercontent.com"
  39. }
  40. ],
  41. },
  42. experimental: {
  43. authInterrupts: true, // 인증 중단 기능 활성화
  44. serverActions: {
  45. bodySizeLimit: '200mb' // 최대 요청 본문 크기 설정
  46. },
  47. // 배럴 임포트 트리셰이킹 — 아이콘/차트 라이브러리 first-load JS 축소
  48. optimizePackageImports: [
  49. 'recharts',
  50. '@fortawesome/free-solid-svg-icons',
  51. '@fortawesome/free-regular-svg-icons',
  52. '@fortawesome/free-brands-svg-icons',
  53. 'lucide-react'
  54. ]
  55. },
  56. // 배포 최적화
  57. output: 'standalone',
  58. // SVG 사용하기 위한 추가
  59. webpack(config) {
  60. config.module.rules.push({
  61. test: /\.svg$/,
  62. use: ['@svgr/webpack'],
  63. });
  64. return config;
  65. },
  66. async rewrites() {
  67. return [
  68. {
  69. source: '/uploads/:path*',
  70. destination: '/api/uploads/:path*'
  71. }
  72. ];
  73. },
  74. async redirects() {
  75. return [
  76. {
  77. source: '/docs/privacy',
  78. destination: '/docs/privacy-policy',
  79. permanent: true
  80. },
  81. {
  82. source: '/docs/terms',
  83. destination: '/docs/terms-of-service',
  84. permanent: true
  85. }
  86. ];
  87. }
  88. };
  89. export default nextConfig;