Skip to content

Add nextConfig.instrumentationClientInject#93785

Merged
mischnic merged 9 commits into
canaryfrom
mischnic/instrumentation-client-config
May 19, 2026
Merged

Add nextConfig.instrumentationClientInject#93785
mischnic merged 9 commits into
canaryfrom
mischnic/instrumentation-client-config

Conversation

@mischnic
Copy link
Copy Markdown
Member

This allows injecting client bootstrap code using only next.config.js (without writing to any user source files).

@github-actions github-actions Bot added created-by: Turbopack team PRs by the Turbopack team. tests Turbopack Related to Turbopack with Next.js. type: next labels May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

Comment thread crates/next-core/src/next_import_map.rs
Comment thread crates/next-core/src/next_import_map.rs Outdated
const hookCalls = allModules
.map(
(_, i) =>
` mod_${i} && mod_${i}.onRouterTransitionStart && mod_${i}.onRouterTransitionStart(url, type);`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question about using null safe access operators here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Webpack indeed doesn't transpile it.

@mischnic mischnic force-pushed the mischnic/instrumentation-client-config branch from 1fa9f65 to af50791 Compare May 18, 2026 08:09
Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mischnic mischnic force-pushed the mischnic/instrumentation-client-config branch from 98f71a4 to 1ae2228 Compare May 18, 2026 13:37
@mischnic mischnic merged commit 944e454 into canary May 19, 2026
162 of 164 checks passed
@mischnic mischnic deleted the mischnic/instrumentation-client-config branch May 19, 2026 15:58
mischnic added a commit that referenced this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by: Turbopack team PRs by the Turbopack team. tests Turbopack Related to Turbopack with Next.js. type: next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants