Skip to content

fix(nitro): point cache driver at .mjs runtime output#35263

Merged
danielroe merged 3 commits into
mainfrom
fix/nitro-server-prerender-cache-driver
Jun 3, 2026
Merged

fix(nitro): point cache driver at .mjs runtime output#35263
danielroe merged 3 commits into
mainfrom
fix/nitro-server-prerender-cache-driver

Conversation

@posva
Copy link
Copy Markdown
Member

@posva posva commented Jun 3, 2026

Fix #35247

@posva posva requested a review from danielroe as a code owner June 3, 2026 08:04
@github-actions github-actions Bot added 5.x 🐛 bug Something isn't working as expected labels Jun 3, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 3, 2026

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@35263

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@35263

nuxt

npm i https://pkg.pr.new/nuxt@35263

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@35263

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@35263

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@35263

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@35263

commit: 8a4ec31

await fsp.rm(cacheDir, { recursive: true, force: true }).catch(() => {})
nitro.options._config.storage = defu(nitro.options._config.storage, {
'internal:nuxt:prerender': {
// TODO: resolve upstream where file URLs are not being resolved/inlined correctly
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm concerned about this TODO here but I couldn't get a full understanding whether this really needed to be fixed at nitro level. I imagine nitro expects a resolved path? Maybe without the extension? @pi0 do you know?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probably resolved in nitro v3

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

if nitro expects a resolved path, should we drop the TODO too?

Copy link
Copy Markdown
Member

@danielroe danielroe Jun 3, 2026

Choose a reason for hiding this comment

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

it was an issue that only occurred on windows IIRC - we'd need to test it on windows to see if this issue still happens

Copy link
Copy Markdown
Member Author

@posva posva Jun 3, 2026

Choose a reason for hiding this comment

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

the pain, do we have anybody on the team using windows that can test it?

@coderabbitai

This comment has been minimized.

@posva posva changed the title fix(nitro-server): point cache driver at .mjs runtime output fix(nitro): point cache driver at .mjs runtime output Jun 3, 2026
Comment thread packages/nitro-server/src/index.ts Outdated
Copy link
Copy Markdown
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

thank you ❤️

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 3, 2026

Merging this PR will degrade performance by 18.5%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 19 untouched benchmarks
⏩ 3 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
writeTypes in the basic-types fixture 48.7 ms 59.7 ms -18.5%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/nitro-server-prerender-cache-driver (8a4ec31) with main (5a126b1)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Comment thread packages/nitro-server/src/index.ts Outdated
@danielroe danielroe merged commit c1f6e49 into main Jun 3, 2026
31 checks passed
@danielroe danielroe deleted the fix/nitro-server-prerender-cache-driver branch June 3, 2026 17:45
@github-actions github-actions Bot mentioned this pull request Jun 3, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 🐛 bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nuxt 5 / Nitro 3 prerender build failure (#nitro/virtual/storage)

2 participants