Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

@rollup/plugin-node-resolve: Unresolved import due to nested sub-module paths in exports field #641

Closed
carsonfarmer opened this issue Nov 10, 2020 · 4 comments

Comments

@carsonfarmer
Copy link

Firstly, thanks for the amazing work on the @rollup/plugin-node-resolve plugin, its a life-saver. Especially happy to have the latest work on supporting package entry points! This issue relates to how the plugin handles nested paths in package entry points. In theory, the examples in the repl.it should be allowed: https://nodejs.org/api/packages.html#packages_package_entry_points

Expected Behavior

To be able to resolve packages with export fields that contain nested paths. This seems like a common scenario:

...
"exports": {
    ".": {
      "require": "./cjs/src/index.js",
      "import": "./esm/src/index.js",
      "browser": "./esm/src/browser.js"
    }
},
...

or

...
"exports": {
    ".": "./foo/nested/c.js",
    "./bar": "./bar/a.js"
  }
...

or any of the examples in https://nodejs.org/api/packages.html#packages_package_entry_points

Actual Behavior

The plugin is unable to resolve nested paths. Please see attached repl.it for a minimal reproducible example of this.

Additional Information

@lukastaegert
Copy link
Member

lukastaegert commented Nov 10, 2020

Well, it has not been released yet. Please file any issues you find after the feature has actually been released: https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md

@lukastaegert
Copy link
Member

Note that the feature has already been merged and will be part of the next release: #540

@carsonfarmer
Copy link
Author

Apologies for the noise, I don't know how I missed that: 🤦. Looking forward to the release!

@aomarks
Copy link

aomarks commented Nov 12, 2020

Note that the feature has already been merged and will be part of the next release: #540

Any ETA on release? (No pressure, just curious, eagerly awaiting the new package entry points feature!)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants