-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nextjs): enhance support for custom server with SWC configuration #29895
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
View your CI Pipeline Execution ↗ for commit c4d18f3.
☁️ Nx Cloud last updated this comment at |
816013e
to
1d7b547
Compare
1d7b547
to
7df7159
Compare
jaysoo
reviewed
Feb 5, 2025
jaysoo
reviewed
Feb 5, 2025
a8d9697
to
5406bad
Compare
jaysoo
approved these changes
Feb 5, 2025
5406bad
to
c45c9e0
Compare
c45c9e0
to
c4d18f3
Compare
FrozenPandaz
pushed a commit
that referenced
this pull request
Feb 8, 2025
…#29895) This pull request contains a few changes to enhance our swc support for Next.js with a custom server. ### Issues Currently, we have a few issues with our configuration when using executors for Next.js with a custom server: 1. The custom server does not have an independent build configuration. 2. The custom server does not have an independent output directory. 3. Serving via `@nx/next-server` or via `@nx/js:node` with configurations `production` and `development` does not always work. (These are contained inside `project.json`). ### Changes All the above issues have been addressed 1. We now have an independent swc build configuration called`.server.swrc` (_follows the same format as `.eslintrc`, `.babelrc`_) etc... 2. Now each custom server output will be named `{app}-server` such that if you have multiple custom servers for multiple apps the names will not clash. 3. Serving now works out of the box but can be adjusted to suit your needs via updating the custom server entry file `main.ts` (cherry picked from commit 29e5ce2)
isaacplmann
pushed a commit
that referenced
this pull request
Feb 11, 2025
…#29895) This pull request contains a few changes to enhance our swc support for Next.js with a custom server. ### Issues Currently, we have a few issues with our configuration when using executors for Next.js with a custom server: 1. The custom server does not have an independent build configuration. 2. The custom server does not have an independent output directory. 3. Serving via `@nx/next-server` or via `@nx/js:node` with configurations `production` and `development` does not always work. (These are contained inside `project.json`). ### Changes All the above issues have been addressed 1. We now have an independent swc build configuration called`.server.swrc` (_follows the same format as `.eslintrc`, `.babelrc`_) etc... 2. Now each custom server output will be named `{app}-server` such that if you have multiple custom servers for multiple apps the names will not clash. 3. Serving now works out of the box but can be adjusted to suit your needs via updating the custom server entry file `main.ts`
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request contains a few changes to enhance our swc support for Next.js with a custom server.
Issues
Currently, we have a few issues with our configuration when using executors for Next.js with a custom server:
@nx/next-server
or via@nx/js:node
with configurationsproduction
anddevelopment
does not always work. (These are contained insideproject.json
).Changes
All the above issues have been addressed
.server.swrc
(follows the same format as.eslintrc
,.babelrc
) etc...{app}-server
such that if you have multiple custom servers for multiple apps the names will not clash.main.ts