next.config.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import type { NextConfig } from "next";
  2. const nextConfig: NextConfig = {
  3. /* config options here */
  4. reactStrictMode: false,
  5. productionBrowserSourceMaps: true,
  6. images: {
  7. remotePatterns: [
  8. {
  9. protocol: "https",
  10. hostname: "localhost",
  11. port: "4000",
  12. pathname: "/uploads/**"
  13. },
  14. {
  15. protocol: "https",
  16. hostname: "img.youtube.com"
  17. },
  18. {
  19. protocol: "https",
  20. hostname: "yt3.ggpht.com"
  21. },
  22. {
  23. protocol: "https",
  24. hostname: "yt3.googleusercontent.com"
  25. }
  26. ],
  27. },
  28. experimental: {
  29. authInterrupts: true, // 인증 중단 기능 활성화
  30. serverActions: {
  31. bodySizeLimit: '200mb' // 최대 요청 본문 크기 설정
  32. }
  33. },
  34. // 배포 최적화
  35. output: 'standalone',
  36. // SVG 사용하기 위한 추가
  37. webpack(config) {
  38. config.module.rules.push({
  39. test: /\.svg$/,
  40. use: ['@svgr/webpack'],
  41. });
  42. return config;
  43. },
  44. async rewrites() {
  45. return [
  46. {
  47. source: '/uploads/:path*',
  48. destination: '/api/uploads/:path*'
  49. }
  50. ];
  51. }
  52. };
  53. export default nextConfig;