vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.51k stars 26.22k forks source link

Feat: Updates output.mdx docs to clarify standalone output usage #66869

Closed simonorzel26 closed 1 week ago

simonorzel26 commented 1 week ago

What?

Clarifies standalone output documentation regarding confusion in: https://github.com/vercel/next.js/issues/49283 https://stackoverflow.com/questions/76506072/standalone-next-js-server-returns-404-for-static-content-unless-next-start-is-ca https://www.reddit.com/r/nextjs/comments/18t6ltd/404s_for_public_and_static_content_in_standalone/

Why?

The standalone build needs the static assets to be moved in a specific folder before being ready to be served via server.js. Unfortunately it isn't so clear sometimes, as the .next/static assets need to be in the same directory as the server.js. This is not always easy to tell, and debug, as with monorepos, the build ofter puts server.js into a nested directory.

ijjk commented 1 week ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

ijjk commented 1 week ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer