Fairly new to next.js/vite and everything was working on netlify for my site.
Since I needed some meta tags to render based on filename, I tried SSR(server side render).
I can build locally and see SSR work locally, although when I try netlify it does not work and get page not found. I do see index.html file when browse files.
Locally, there is an additional issue in that depending on whether its dev build or production build it does not like. so I have to use the below and switch it up to build
// //DEV approach
//import pkg from âreact-helmet-asyncâ;
//const { Helmet } = pkg;
// // PROD approach
import { Helmet } from âreact-helmet-asyncâ;
If using PROD approach you will get error when running local dev version upon showing in browser but
SyntaxError: [vite] Named export âHelmetProviderâ not found. The requested module âreact-helmet-asyncâ is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from âreact-helmet-asyncâ;
const {HelmetProvider} = pkg;
So what are ways I can debug netlify versus what works locally?