Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"node": {
"import": "./build/esm/index.server.js",
"require": "./build/cjs/index.server.js"
}
},
"import": "./build/esm/index.server.js"
Copy link

Choose a reason for hiding this comment

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

Bug: Incomplete fallback handling for module resolution

Missing "require" fallback alongside the "import" fallback. Both "browser" and "node" conditions provide both "import" and "require" options, but the top-level fallback only provides "import". This means tools or environments that don't match "browser" or "node" conditions and attempt to use CommonJS (require) will fail to resolve the package, even though the intent is to provide a fallback for such cases. Consider adding "require": "./build/cjs/index.server.js" after the "import" fallback for consistency and completeness.

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From my tests, it doesn't seem like we need it but I will add it.

},
"./module": {
"types": "./build/module/types.d.ts",
Expand Down
Loading