-
-
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
Next.js Turbopack Support #8105
Comments
We are also eager to add support here! We have 2 plugin repos to add support for webpack, esbuild, rollup, and vite. The latter 3 we support via an opensource project where we'd love to see support so we could potentially adopt it via our usage of their adapters. Upvote the issue there as well. Although I do not think it is on their immediate radar either. unjs/unplugin#302 https://github.com/getsentry/sentry-webpack-plugin https://github.com/getsentry/sentry-javascript-bundler-plugins |
any news on this? |
@mdugue We'll tackle turbopack when it becomes somewhat stable. |
Fwiw I would also encourage you to upvote and comment on this issue which wr could also use to provide support similar to webpack, vite, esbuild and rollup |
UpdateAs of now, we cannot transfer the functionality we currently have in the SDK to Turbopack: Turbopack loaders are not passed transpiled javascript, instead, they are passed the original user code. The SDK needs transpiled JS to properly be able to do transformations to modules. We could transpile the user code ourselves but that is fragile AF - so not an option. As of now, the SDK will continue to work in production mode which is arguably more important, but we would like to support dev mode. Branch with my experiments: #9295 |
To clarify, does it work with Turbopack in production mode as-is or only with the changes in your branch? |
@Stanzilla Turbopack will not work with the SDK (dev and prod). My branch does not contain any fixes or features, just experiments proving that things don't work. |
It's also worth noting that the initial Turbopack support is for |
@yordis The brunt of the work needs to be implemented in Next.js
Also, I want to reiterate: You should be able to run Turbopack in dev in combination with Sentry without any issues. Nothing should break. Unless you want to monitor your dev environment, everything should be good. Turbo is not stable for prod builds yet. |
thank you for the reply. Is the Sentry team going to submit these feature PR-s to the open source Next.js repo? If not, does the Next.js team know about this requirement and do you know whether this is on their roadmap at all? |
@pppdns there is vercel/next.js#69294 |
Likely not. These tasks require expert knowledge and have some nuance that the Next.js team needs to figure out and align with their goals. Simply submitting a PR likely aint gonna cut it because it first requires discussion.
They know about it. I don't know their current roadmap. |
Do not work for pnpm. Waiting for fix in vercel/next.js#68805 |
@r34son I think for pnpm you can use overrides: https://pnpm.io/package_json#pnpmoverrides |
Nope, overrides doesn't solve the issue. I posted fix for pnpm here vercel/next.js#68805 (comment) |
Thanks for sharing the link for the fix. As fas as I know, this should also work with an override. In pnpm it's not a key at the root of the "pnpm": {
"overrides": {
"import-in-the-middle": "1.11.2"
}
} And just for context: In |
Overrides doesn't hoist packages to the root level of node_modules. How can it fix the issue? |
Important
This issue is tracking progress on Turbopack Support. If you find bugs or problems with the Sentry SDK in combination with Turbopack please open a separate issue. Thank you!
Problem Statement
Sentry should work in combination with Turbopack with all of its features.
Current Status (Last Update Nov 6, 2024)
onBuildEnd
hook implemented in Next.js- Needs way to inject debug IDs into bundles implemented in Next.js
The text was updated successfully, but these errors were encountered: