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):
Expected Behavior
Rollup can resolve exports with extensions like:
with exports like this:
{ "name": "dummy-exported", "version": "1.0.0", "exports": { "./*.js": { "import": "./dist/*.mjs", "require": "./dist/*.cjs" } } }Actual Behavior
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):