I wrote a Next.js app and I'm close to deploying. I would like to know what are the strictly necessary files to copy on the server to deploy while keeping it SSR (not statically generated with next export):
.next/ folder?Copy .next folder with package.json && npm install --production should install only the dependencies of your app.
Keep the folder structure.
Side note, it is bad practice to copy node_modules between environments because there are some packages that are os specific.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With