Skip to content

fix(build): let the bundle analyzer read docs client source maps - #1482

Merged
larbish merged 1 commit into
mainfrom
fix/build-docs-sourcemaps
Nov 12, 2026
Merged

larbish merged 1 commit into
mainfrom
fix/build-docs-sourcemaps

Conversation

@larbish

@larbish larbish commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Why

On the bundle-size page, every chunk showed "None of your files are in this chunk". docs/nuxt.config.ts set vite.build.sourcemap: false, which @nuxt/vite-builder applies over nuxt.options.sourcemap. The analyzer sets sourcemap.client: 'hidden' while it runs, but that setting lost, so no client .map files were written and Sonda couldn't split chunks into files and packages.

What changed

  • Removed the vite.build.sourcemap: false block from docs/nuxt.config.ts. Client source maps are already off by default in production, and the sourcemap warnings it was added to hide no longer appear.

Evidence

npx --yes [email protected] docs --extends ../layer --no-serve, client.json:

before after
chunk resources 0 1423 (201 of 207 assets)
chunks in _...slug_.js 0 15

Plain nuxt build docs --extends ../layer, before and after: 0 .map files in .output/public, 178 in .output/server, no "Sourcemap is likely to be incorrect" warnings.

ELI5

The bundle report breaks each JavaScript file into the source files it came from, using a map the build writes next to it. A docs setting stopped those maps from being written, so the report had nothing to break down. Removing that setting lets the report work, and normal builds still ship no maps.

🤖 Generated with Amp, reviewed by @larbish before opening.

@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docus Ready Ready Preview Nov 12, 2026 3:02pm UTC

@pkg-pr-new

pkg-pr-new Bot commented Nov 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/create-docus@1482
npm i https://pkg.pr.new/docus@1482

commit: 91e213d

@docus-bundle-report

Copy link
Copy Markdown

Bundle size

Explore the comparison →

Client 804.7 kB (no change) · Server 1.60 MB $\color{red}\textsf{(+7.06 kB, +0.4}\%\textsf{)}$

No route loads 100 B more or less before it renders.

Largest changes in the client
Package or file Base PR Δ
node_modules/@shikijs/langs n/a 81.4 kB +81.4 kB
[unassigned] n/a 66.2 kB +66.2 kB
node_modules/@nuxt/ui n/a 60.2 kB +60.2 kB
node_modules/reka-ui n/a 59.0 kB +59.0 kB
node_modules/@sqlite.org/sqlite-wasm n/a 54.8 kB +54.8 kB
node_modules/entities n/a 32.3 kB +32.3 kB
node_modules/comark n/a 27.9 kB +27.9 kB
node_modules/motion-dom n/a 25.6 kB +25.6 kB
node_modules/zod n/a 22.8 kB +22.8 kB
node_modules/@vue/runtime-core n/a 22.5 kB +22.5 kB

And 266 more packages or files.

Largest changes in the server
Package or file Base PR Δ
[unassigned] 111.0 kB 318.9 kB +207.9 kB (+187.2%)
.nuxt/dist/server/_nuxt/vue.js 190.3 kB n/a −190.3 kB (−100.0%)
.nuxt/dist/server/_nuxt/AssistantDemo.js 182.0 kB n/a −182.0 kB (−100.0%)
.nuxt/dist/server/server.mjs 134.6 kB n/a −134.6 kB (−100.0%)
.nuxt/dist/server/_nuxt/node4.js 102.7 kB n/a −102.7 kB (−100.0%)
node_modules/@nuxt/ui n/a 93.7 kB +93.7 kB
node_modules/@shikijs/langs n/a 77.6 kB +77.6 kB
.nuxt/dist/server/_nuxt/Img.js 70.3 kB n/a −70.3 kB (−100.0%)
node_modules/@babel/parser n/a 66.0 kB +66.0 kB
node_modules/reka-ui n/a 65.5 kB +65.5 kB

And 465 more packages or files.

Brotli sizes. Changes under 100 B are left out of the tables. Measured by nuxt-bundle-analyzer for 91e213d.

@larbish
larbish merged commit fe1eb53 into main Nov 12, 2026
13 checks passed
@larbish
larbish deleted the fix/build-docs-sourcemaps branch November 12, 2026 15:36

This branch was successfully deployed

1 active deployment
Preview — 91e213d9 Deployed Nov 12, 2026 by vercel[bot]
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.

1 participant