Skip to content

docs: add builder guide - #35576

Merged
danielroe merged 3 commits into
mainfrom
docs/builder-output
Jul 15, 2026
Merged

danielroe merged 3 commits into
mainfrom
docs/builder-output

Conversation

@danielroe

@danielroe danielroe commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #35364

📚 Description

follow on from #35463, this adds docs for the new nuxt builder api

@github-actions github-actions Bot added 5.x 📚 documentation Documentation improvements or additions labels Jul 14, 2026
@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3296c1e8-f1de-470c-92b8-a717d79989f3

📥 Commits

Reviewing files that changed from the base of the PR and between ad958d6 and 03d8c52.

📒 Files selected for processing (1)
  • docs/3.guide/6.going-further/8.builders.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/3.guide/6.going-further/8.builders.md

Walkthrough

Adds documentation for Nuxt builders, covering their interface, lifecycle, production and development responsibilities, server integration, hooks, and Nuxt Kit helpers. It also documents the NuxtBuildOutputs contract, lazy output providers, the setBuildOutput API, and examples registering server entries, client manifests, and SSR styles.

Possibly related PRs

  • nuxt/nuxt#35463: Documents and implements the setBuildOutput API and nuxt/* build output contract.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR only adds documentation and does not implement the Nasti/Rolldown backend or builder behaviour requested in #35364. Implement the Nasti builder backend and related bundling, dev-server, and manifest/styling integration, or retarget the issue to documentation work.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely matches the docs-only builder guide changes.
Description check ✅ Passed The description is directly related to the builder API documentation updates.
Out of Scope Changes check ✅ Passed The changes stay focused on builder documentation and the new setBuildOutput API, with no obvious unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
📋 Issue Planner

Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).

View plan for ticket: #35364

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/builder-output

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.

@coderabbitai coderabbitai Bot left a comment

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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6cfe44b and 5f2d7bd.

📒 Files selected for processing (2)
  • docs/3.guide/6.going-further/8.builders.md
  • docs/4.api/5.kit/14.builder.md

Comment on lines +181 to +195
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'))

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.

🎯 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: define serializedClientManifest or mark it as omitted build output context.
  • docs/4.api/5.kit/14.builder.md#L354-L364: provide imports and definitions for serverEntryURL, serializedManifest, resolve, and serverDir, 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.

@Nsttt Nsttt left a comment

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.

lgtm

@danielroe
danielroe merged commit c437915 into main Jul 15, 2026
22 checks passed
@danielroe
danielroe deleted the docs/builder-output branch July 15, 2026 06:26
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
2 of 5 tasks
danielroe added a commit that referenced this pull request Jul 17, 2026
@github-actions github-actions Bot mentioned this pull request Jul 17, 2026
danielroe added a commit that referenced this pull request Jul 17, 2026
danielroe added a commit that referenced this pull request Jul 17, 2026
danielroe added a commit that referenced this pull request Jul 17, 2026
danielroe added a commit that referenced this pull request Jul 17, 2026
@github-actions github-actions Bot mentioned this pull request Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 📚 documentation Documentation improvements or additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Nasti (Rolldown) as an alternative builder backend (@nuxt/nasti-builder)

2 participants