Hello everyone,
I am in the process of building my first Next.js site. I am extremely new to this, and I have read extensively on the forum and various blogs trying to resolve my 404 error on Netlify. I have changed and modified many configurations, whether in the next.config.ts file or in the redirects files. In short, I have really tried a lot of things.
Could someone provide me with new solutions beyond those already available on the forum? I would greatly appreciate your help. A big thank you in advance!
For your information:
My _redirects file is in the root with:/* /index.html 200
My next.config.ts **file is in the root with:**import type { NextConfig } from “next”;
const nextConfig: NextConfig = {
reactStrictMode: true,
swcMinify: true, // Optimization with SWC
output: “export”, // Allows using next export
images: {
unoptimized: true, // Netlify does not natively support Next.js image optimization
},
};
export default nextConfig;
• My netlify.toml file is in the root with:[build]
command = “npm run build”
publish = “.next”
[[redirects]]
from = “/*”
to = “/index.html”
status = 200
[[plugins]]
package = “@netlify/plugin-nextjs”