I need help with deployment of the Next.js SSG on s3bucket.
I have a Next.js (v: "13.4.9") nx monorepo app, with these config settings:
output: 'export',
distDir: 'dist',
trailingSlash: true,
experimental: { appDir: true },
When I navigate through the app everything is fine, but If I try to refresh the page, error 404 appears.
To me it seems like I am trying to access /about/ but the page is actually on /about/index.html. When I add /page/index.html manually - everything works great again.
I thought I understood correctly next.js documentation, that the trailingSlash: true, property should fix that problem but it's not happening.
I tried adding index.html programaticaly for links when the code is on server, but the html part simply dissapears from the url... So that wasn't epected at all.
What else could be the problem? Is experimental: { appDir: true } causing problems for Next.js (v: "13.4.9") ? How can I fix this problem? Is anyone having an idea why .html part disappears just like that?