Skip to content

nuxt: disable nitro server sourcemaps - #5637

Merged
ppawlowski merged 2 commits into
mainfrom
perf/no-nitro-sourcemaps
Aug 19, 2026
Merged

nuxt: disable nitro server sourcemaps#5637
ppawlowski merged 2 commits into
mainfrom
perf/no-nitro-sourcemaps

Conversation

@dimitrieh

Copy link
Copy Markdown
Contributor

Description

Sets nitro.sourceMap: false in nuxt/nuxt.config.ts. Nitro's default is true, which emits a .mjs.map next to every server chunk. On run 32107141754 that was 186 map files in the Netlify functions bundle.

The win is marginal and worth stating plainly: it removes those files from the output and takes a few seconds off the nitro server build, which was 21.6s of a 24m15s job. It is not a meaningful change to overall build time.

The cost: sourcemaps are what make a server-side stack trace in the Netlify function logs readable. Without them, runtime errors in the SSR fallback are harder to trace back to source. If you would rather keep that debuggability, closing this PR is the right call and costs nothing.

Related Issue(s)

None

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

Nitro defaults sourceMap to true, so every server chunk gets a .mjs.map
alongside it in the Netlify functions bundle. Turning it off trims those
files from the output and shaves a few seconds off the nitro server build.

Tradeoff: server-side stack traces in the Netlify function logs no longer
resolve back to the original source.
@dimitrieh

Copy link
Copy Markdown
Contributor Author

I think these are mostly relevant when developing locally, not for when previewing builds on netlify 🤔

@dimitrieh
dimitrieh requested a review from ppawlowski August 18, 2026 15:21
@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit d7b030d
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/6a8476308c7b640008104bf1
😎 Deploy Preview https://deploy-preview-5637--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 63 (🟢 up 13 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 85 (🔴 down 7 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploy Preview for flowforge-website ready!

Name Link
🔨 Latest commit 309c911
🔍 Latest deploy log https://app.netlify.com/projects/flowforge-website/deploys/6a84787430c6290008a482c3
😎 Deploy Preview https://deploy-preview-5637--flowforge-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 64 (🟢 up 10 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 85 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@ppawlowski
ppawlowski merged commit 8ca2826 into main Aug 19, 2026
7 checks passed
@ppawlowski
ppawlowski deleted the perf/no-nitro-sourcemaps branch August 19, 2026 05:35
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