next.config.ts 628 B

123456789101112131415161718192021222324252627282930313233
  1. import { configHeader } from '@/utils/constants';
  2. import type { NextConfig } from "next";
  3. const nextConfig: NextConfig = {
  4. reactStrictMode: true,
  5. typescript: {
  6. ignoreBuildErrors: false,
  7. },
  8. images: {
  9. unoptimized: true,
  10. remotePatterns: [],
  11. },
  12. async headers() {
  13. return configHeader;
  14. },
  15. async rewrites() {
  16. return [
  17. {
  18. source: '/:slug.html',
  19. destination: '/product/:slug',
  20. },
  21. ];
  22. },
  23. compress: true,
  24. experimental: {
  25. optimizePackageImports: ["lodash", "date-fns"],
  26. serverActions: {
  27. bodySizeLimit: "2mb",
  28. },
  29. },
  30. };
  31. export default nextConfig;