next.config.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. },
  48. // 배포 최적화
  49. output: 'standalone',
  50. // SVG 사용하기 위한 추가
  51. webpack(config) {
  52. config.module.rules.push({
  53. test: /\.svg$/,
  54. use: ['@svgr/webpack'],
  55. });
  56. return config;
  57. },
  58. async rewrites() {
  59. return [
  60. {
  61. source: '/uploads/:path*',
  62. destination: '/api/uploads/:path*'
  63. }
  64. ];
  65. },
  66. async redirects() {
  67. return [
  68. {
  69. source: '/docs/privacy',
  70. destination: '/docs/privacy-policy',
  71. permanent: true
  72. },
  73. {
  74. source: '/docs/terms',
  75. destination: '/docs/terms-of-service',
  76. permanent: true
  77. }
  78. ];
  79. }
  80. };
  81. export default nextConfig;