Repository navigation
docs: add builder guide - #35576
docs: add builder guide#35576
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds documentation for Nuxt builders, covering their interface, lifecycle, production and development responsibilities, server integration, hooks, and Nuxt Kit helpers. It also documents the Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
📋 Issue PlannerLet us write the prompt for your AI agent so you can ship faster (with fewer bugs). View plan for ticket: ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/3.guide/6.going-further/8.builders.md`:
- Around line 181-195: Make both setBuildOutput examples explicitly contextual
or directly copyable: in docs/3.guide/6.going-further/8.builders.md lines
181-195, define serializedClientManifest or clearly label it as omitted
build-output context; in docs/4.api/5.kit/14.builder.md lines 354-364, provide
the imports and definitions for serverEntryURL, serializedManifest, resolve, and
serverDir, or clearly identify them as pre-existing context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 69e89f9e-0278-45a0-be65-34ffe9185900
📒 Files selected for processing (2)
docs/3.guide/6.going-further/8.builders.mddocs/4.api/5.kit/14.builder.md
| export const bundle: NuxtBuilder['bundle'] = async (nuxt) => { | ||
| const serverDir = resolve(nuxt.options.buildDir, 'dist/server') | ||
|
|
||
| // ...run your client and server bundles here, writing artifacts to disk... | ||
|
|
||
| if (nuxt.options.ssr) { | ||
| // Point `nuxt/entry` at the built SSR app entry. | ||
| const serverEntryURL = pathToFileURL(resolve(serverDir, 'server.mjs')).href | ||
| setBuildOutput('serverEntry', () => `export { default } from ${JSON.stringify(serverEntryURL)}`) | ||
|
|
||
| // Provide the client manifest produced by your client build. | ||
| setBuildOutput('clientManifest', () => `export default ${serializedClientManifest}`) | ||
|
|
||
| // If you emit a per-component styles map alongside its CSS chunks: | ||
| setBuildOutput('ssrStyles', resolve(serverDir, 'styles.mjs')) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Make the setBuildOutput examples copyable or explicitly contextual.
Both examples reference undeclared values, so readers copying them encounter immediate reference errors.
docs/3.guide/6.going-further/8.builders.md#L181-L195: defineserializedClientManifestor mark it as omitted build output context.docs/4.api/5.kit/14.builder.md#L354-L364: provide imports and definitions forserverEntryURL,serializedManifest,resolve, andserverDir, or label them as pre-existing context.
📍 Affects 2 files
docs/3.guide/6.going-further/8.builders.md#L181-L195(this comment)docs/4.api/5.kit/14.builder.md#L354-L364
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/3.guide/6.going-further/8.builders.md` around lines 181 - 195, Make both
setBuildOutput examples explicitly contextual or directly copyable: in
docs/3.guide/6.going-further/8.builders.md lines 181-195, define
serializedClientManifest or clearly label it as omitted build-output context; in
docs/4.api/5.kit/14.builder.md lines 354-364, provide the imports and
definitions for serverEntryURL, serializedManifest, resolve, and serverDir, or
clearly identify them as pre-existing context.
🔗 Linked issue
resolves #35364
📚 Description
follow on from #35463, this adds docs for the new nuxt builder api