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
Incomplete and unclear documentation on how to get rid of target: serverless on next config js #30822
Comments
I'm in the same place. We're using AWS Lambda (biz req at this time, sadly) with target="serverless" and a bit of a slapped together implementation of In order to upgrade, we'll need to be able to leverage file tracing. A code sample a la |
@ijjk is there anything I can do for you to help with use case? |
Hi, there is an active PR here which expands the tooling around leveraging these traces and expanded documentation/examples will follow as well. |
Hello @charly714 |
@HectorLS no additional steps are needed when deploying on Vercel as we already leverage the new output file traces mentioned and ensure the correct target is set. |
This adds documentation to explain how the `outputStandalone` config can be leveraged to reduce production deployment size and leverage the output file traces. This also adds a note for the `outputFileTracingRoot` config as it may be needed in some monorepo setups. A follow-up PR will update our Docker example to leverage this config as well. ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` x-ref: #31003 x-ref: #32252 Closes: #30822
Thanks, @ijjk! I've posted the PR and new docs for my team to take a look at. We'll follow up if we have additional questions. Appreciate your work on this :) |
This updates our docker example to leverage the output traces and standalone build to reduce the resulting docker image quite a bit. docker image size before: `272MB` docker image size after: `121MB` node-14:alpine size (base image): `118MB` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` x-ref: #32255 x-ref: #32252 x-ref: #30822
This updates our docker example to leverage the output traces and standalone build to reduce the resulting docker image quite a bit. docker image size before: `272MB` docker image size after: `121MB` node-14:alpine size (base image): `118MB` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` x-ref: vercel#32255 x-ref: vercel#32252 x-ref: vercel#30822
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
This adds documentation to explain how the `outputStandalone` config can be leveraged to reduce production deployment size and leverage the output file traces. This also adds a note for the `outputFileTracingRoot` config as it may be needed in some monorepo setups. A follow-up PR will update our Docker example to leverage this config as well. ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` x-ref: vercel#31003 x-ref: vercel#32252 Closes: vercel#30822
What version of Next.js are you using?
12.0.2
What version of Node.js are you using?
14.17.6
What browser are you using?
Chrome
What operating system are you using?
MacOs
How are you deploying your application?
Serverless
Describe the Bug
Hello,
I updated to next js v12 today, and after reading the breaking changes in the blog I saw that the option
target: serverless
on the next.config.js file is going to be deprecated in a future version. (In the blog is written as a breaking change, as if it will make the app not work from this recently released version, which doesn't seem to be the case).There is a link to explain how to "possibly" solve it, but the documentation is extremely poor. It generates us more questions than answers.
I open this issue as a bug, because to have good documentation should be part of such a major release.
Expected Behavior
It would be really nice to have a more extended and detailed documentation, including code samples.
Having a guide for specific for when using Serverless would be amazing.
To Reproduce
Visit https://nextjs.org/docs/advanced-features/output-file-tracing
The text was updated successfully, but these errors were encountered: