-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(nextjs): Populate __SENTRY_SERVER_MODULES__ in Turbopack #19231
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
Changes from all commits
c4c6471
552d911
c8ba43f
919109a
3650d53
d95c8e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ import * as path from 'path'; | |
| import type { VercelCronsConfig } from '../../common/types'; | ||
| import type { RouteManifest } from '../manifest/types'; | ||
| import type { JSONValue, TurbopackMatcherWithRule } from '../types'; | ||
| import { getPackageModules } from '../util'; | ||
|
|
||
| /** | ||
| * Generate the value injection rules for client and server in turbopack config. | ||
|
|
@@ -40,6 +41,9 @@ export function generateValueInjectionRules({ | |
| if (vercelCronsConfig) { | ||
| serverValues._sentryVercelCronsConfig = JSON.stringify(vercelCronsConfig); | ||
| } | ||
| // Inject server modules (matching webpack's __SENTRY_SERVER_MODULES__ behavior) | ||
| // Use process.cwd() to get the project directory at build time | ||
| serverValues.__SENTRY_SERVER_MODULES__ = getPackageModules(process.cwd()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong package.json chosen in monoreposMedium Severity
sentry[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Turbopack value injection incompatible with bare identifier accessHigh Severity The |
||
|
|
||
| if (Object.keys(isomorphicValues).length > 0) { | ||
| clientValues = { ...clientValues, ...isomorphicValues }; | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.