This question was previously asked here but the methods specified there do not work.
I am using tags in Next.js to navigate between pages, and they work in both local development environment and local builds. When I deploy to Firebase however Next.js Links aren't dynamic, I can see the "refresh icon" on the browser.
I have added trailing slashes to my routes, i.e /hello/, and to the beginning of api routes, /fetch?x=3. This works everywhere, except on Firebase. I'm deploying with Firebase experimental Next.js support, as outlined here.
This is my Next.js config:
const nextConfig = {
reactStrictMode: true,
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false }
config.externals.push("pino-pretty", "lokijs", "encoding")
return config
},
trailingSlash: true,
}
module.exports = nextConfig