Next.js Standalone Output #7946
patdx
started this conversation in
Feature Requests
Replies: 1 comment 4 replies
-
Any updates on this? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not exactly sure how to fit it into the Nx system, but something to watch is Next.js's recently added experimental
outputStandalone
option:vercel/next.js@eb7b401
For anyone trying to serve a self-hosted Next.js app, one useful point is the next.config.js seems to be evaluated (I assume with the
PHASE_PRODUCTION_SERVER
option) and baked directly into the generated server startup script. The compiled config can be found at theconfig
property of the build output file.next/required-server-files.json
.This removes the need for copying next.config.js directly into the build output or production-time dependencies on build-time config plugins like
withNx
from@nrwl/nx
, etc, and I guess is more similar to how Next.js apps get deployed inside of Vercel's own system too.This has been one point of pain for me and I think for others too (see #5473 #6985 #6886 #7448)
It would be cool if
@nrwl/next
could take inspiration from this to precompile the next config somehow. In the long term, it would also be nice to have built in support for using their new file trace features but maybe it is better to wait for things to stabilize on Vercel's side first.Beta Was this translation helpful? Give feedback.
All reactions