Reputation: 2011
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?Upvotes: 3
Views: 1923
Reputation: 35503
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 cause there are some packages that are os specific.
Upvotes: 7