-
-
Notifications
You must be signed in to change notification settings - Fork 626
Closed
Description
- Rollup Plugin Name: node-resolve
- Rollup Plugin Version: 15.1.0
- Rollup Version: 3.27.0
- Operating System (or Browser): Linux
- Node Version: 20.3.1
- Link to reproduction (
⚠️ read below): https://github.com/susnux/node-exports-demo-rollup
Expected Behavior
Rollup can resolve exports with extensions like:
import { foo } from 'dummy-exported/foo.js'with exports like this:
{
"name": "dummy-exported",
"version": "1.0.0",
"exports": {
"./*.js": {
"import": "./dist/*.mjs",
"require": "./dist/*.cjs"
}
}
}Actual Behavior
(!) Plugin node-resolve: Could not resolve import "dummy-exported/foo.js" in /tmp/a/src/main.js using exports defined in /tmp/a/node_modules/dummy-exported/package.json.
(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
dummy-exported/foo.js (imported by "src/main.js")
Additional Information
See linked repository to reproduce the issue. You can also see that the exports section is correct, because Node can resolve the module correctly (see by running inside the example):
node ./src/main.jsReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels