Repository navigation
build: bundle runtime entries and drop traced node_modules - #4701
Merged
Merged
Conversation
Bundle all runtime and preset runtime files as entries of a single rolldown build so dependencies are inlined into shared chunks (`dist/runtime/_libs`) instead of being traced into `dist/node_modules`. - route generated renderer template `rendu` import through `#nitro/runtime/rendu` - use `console` instead of `consola` in runtime - move `rou3` to dev dependencies (build-time only, bundled)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
Public `Nitro.hooks` and `NitroApp.hooks` use structural `Hookable` / `HookableCore` interfaces so inlined type copies stay assignable (hookable classes have private members).
pi0
approved these changes
Oct 3, 2026
pi0x
pushed a commit
to meta-syntax/nitro
that referenced
this pull request
Oct 13, 2026
Runtime deps are no longer traced since nitrojs#4701, so the dev public assets template imports `mime` via `#nitro/runtime/mime`.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundles every runtime file (
src/runtime/**andsrc/presets/*/runtime/**) as entries of one rolldown build, so dependencies are inlined into chunks shared across runtime entries (dist/runtime/_libs,dist/runtime/_chunks) instead of traced intodist/node_modules.runtimeDir/presetsDir).node:fs) into runtime chunks.#…imports keep side effects (obuild'sno-externalwas droppingimport "#nitro/virtual/polyfills"), and the polyfills import is hoisted back to the top of chunks since rolldown places chunk and external imports above it.renderToResponsevia#nitro/runtime/rendu(previously resolved from tracedrendu).consoleinstead ofconsola.rou3moved to devDependencies (build-time only, now bundled).hookableis bundled too (moved to devDependencies). Its classes have private members, so inlined.d.tscopies would not be assignable to each other; publicNitro.hooks/NitroApp.hooksnow use handrolled structuralHookable/HookableCoreinterfaces (src/types/_hookable.ts). Generated app code importsHookableCorevia#nitro/runtime/hookable.Inlined runtime libs now live under nitro's
dist, so in user builds they land in_chunks/instead of_libs/<pkg>.mjs.Size: packed tarball 660.7 KB → 603.2 KB (−8.7%), unpacked 2424 KB → 2186 KB (−9.8%), 415 → 407 files.
🤖 Generated with AI assistant