Skip to content

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Nov 9, 2025

Nitro uses unenv pakcage shims for whatwg-url, cross-fetch, debug, fsevents, inherits and node-fetch npm packages (source: https://github.com/unjs/unenv/tree/main/src/runtime/npm)

Main issue with shimming is that CommonJS plugin might import them wrongly.

This PR disables shims. Leaving it up to users to add them back case-by-case.

@vercel
Copy link

vercel bot commented Nov 9, 2025

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

Project Deployment Preview Comments Updated (UTC)
nitro.build Ready Ready Preview Comment Nov 9, 2025 11:24pm

@pi0 pi0 changed the title refactor!: disable unenv npm shims refactor!: disable unenv npm shims by default Nov 9, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/nitrojs/nitro@3767

commit: 3c6942c

@pi0 pi0 merged commit e280abb into main Nov 9, 2025
11 checks passed
@pi0 pi0 deleted the refactor/no-npm-shims branch November 9, 2025 23:34
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