-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
ref(nextjs): Make build-time value injection turbopack compatible #14081
Conversation
size-limit report 📦
|
Thank you for this!! I can't wait for faster build times during development! 🥳 |
@OskarD Unless you want to use Sentry during development (which would be of questionable value), you can already just switch to Turbopack! Sentry will not crash you or anything. |
My hot reloading doesn't work, and I get these warnings:
I don't get them without the dependency installed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, how will we handle this once turbopack is stable for prod?
@OskarD All of these are just warnings. Everything except for certain Sentry SDK features will operate normally. The SDK causing MHR to not work is incredibly unlikely but I am happy to be proven wrong if you provide a reproduction example! |
In theory, this should already work for prod turbopack. The only thing left is the release injection for which we need a breaking change. |
Ref: #8105
To inject build-time variables, in addition to doing so via a custom loader, we will be injecting them via the
env
option.Caveat: We are currently using the Next.js build ID as a release name. This build id is passed to the
webpack
option. Since thewebpack
option doesn't exist for turbopack we don't have access to the build ID. For now we will simply not inject a release name, which may be better anyhow since turbopack is currently only stable for dev.