Skip to content
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

Turbopack Build: Optimize instrumentation hook generation #77832

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Apr 4, 2025

What?

  • Add compiled in for middleware and instrumentation in Turbopack dev.
  • Fixed a bug where instrumentation.js was being compiled like a page file, local testing moves bootup from 2.5s to 700ms when you have a instrumentation file.

How?

  • Added early returns in hot-reloader-turbopack.ts for middleware and instrumentation paths when there's no route definition, those cases are handled separately already.
  • Added build status indicators in turbopack-utils.ts for middleware and instrumentation using startBuilding and finishBuilding hooks
  • Added proper naming for Node.js and Edge instrumentation in the build status

Closes PACK-4278

@ijjk ijjk added created-by: Turbopack team PRs by the Turbopack team. type: next labels Apr 4, 2025
Copy link
Member Author

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

@ijjk
Copy link
Member

ijjk commented Apr 4, 2025

Tests Passed

@timneutkens timneutkens marked this pull request as ready for review April 4, 2025 14:29
@timneutkens timneutkens merged commit c1f3462 into canary Apr 4, 2025
133 of 134 checks passed
@timneutkens timneutkens deleted the 04-04-turbopack_build_optimize_instrumentation_hook_generation branch April 4, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants