Skip to content

Conversation

@onmax
Copy link
Contributor

@onmax onmax commented Jan 30, 2026

Code splitting is a key Nitro feature but wasn't documented. Added section explaining how route handlers are chunked and how to disable it with inlineDynamicImports.

@onmax onmax requested a review from pi0 as a code owner January 30, 2026 22:39
@vercel
Copy link

vercel bot commented Jan 30, 2026

@onmax is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

Two documentation pages were updated to add "Code splitting" explanations describing per-route-handler chunking and on-demand loading, and to expand the inlineDynamicImports Rollup option description with default, bundling behavior, and preset implications.

Changes

Cohort / File(s) Summary
Routing & config docs
docs/1.docs/5.routing.md, docs/3.config/0.index.md
Inserted "Code splitting" sections describing that Nitro creates separate chunks per route handler loaded on demand. Expanded inlineDynamicImports docs to state Default: false, explain single-file bundling when true, and note that some presets may enable bundling by default.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format with 'docs:' prefix and clearly describes the main change: adding code splitting documentation.
Description check ✅ Passed The description is directly related to the changeset, explaining that code splitting documentation was added and detailing what was documented about route handler chunking and the inlineDynamicImports option.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.


```ts
export default defineNitroConfig({
inlineDynamicImports: true
Copy link
Member

Choose a reason for hiding this comment

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

We could just link it to configuration section for changing behavior. Some deployment presets are forced to do this (not as benefit really, it increases cold start actually!), not in any normal conditions it is good idea to enable flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in ef3e460

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

thnx!

@pi0 pi0 merged commit a1e4ca7 into nitrojs:main Jan 31, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants