Uh oh!
There was an error while loading. Please reload this page.
feat(nextjs): Add experimental support for react component annotation in Turbopack - #19604
Conversation
size-limit report 📦
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Uh oh!
There was an error while loading. Please reload this page.
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
Lms24
left a comment
There was a problem hiding this comment.
Nice! Great that you found a way to bring this back to turbopack!
Had a concern about how we annotate but this shouldn't hold us back from shipping the experimental option.
| const callback = this.async() ?? this.callback; | ||
| const hooks = createComponentNameAnnotateHooks(ignoredComponents, false); |
There was a problem hiding this comment.
Q: I guess with loaders we can only use the component-based plugin and have to set injectIntoHtml to false, correct?
There was a problem hiding this comment.
I think we could actually use both but went with the lower html impact – safer default imo
Uh oh!
There was an error while loading. Please reload this page.
Documents two new experimental Turbopack options for Next.js in withSentryConfig: - `_experimental.turbopackReactComponentAnnotation` — [getsentry/sentry-javascript#19604](getsentry/sentry-javascript#19604) - `_experimental.turbopackApplicationKey` — [getsentry/sentry-javascript#19542](getsentry/sentry-javascript#19542)
Adds a Turbopack loader that annotates React components with
data-sentry-component,data-sentry-element, anddata-sentry-source-fileattributes at build time. This enables searching Replays by component name, seeing component names in breadcrumbs, and performance monitoring — previously only available with webpack builds.componentAnnotationLoaderthat reusescreateComponentNameAnnotateHooksfrom@sentry/bundler-plugin-coreconstructTurbopackConfigfor*.{tsx,jsx}files with condition:{ not: 'foreign' }(Next.js 16+ only)_experimental.turbopackReactComponentAnnotationin SentryBuildOptionsUsage
closes#19319