Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[node-resolve] * in exports key can't correctly resolved #1476

Closed
tjx666 opened this issue Apr 5, 2023 · 3 comments · Fixed by #1549
Closed

[node-resolve] * in exports key can't correctly resolved #1476

tjx666 opened this issue Apr 5, 2023 · 3 comments · Fixed by #1549

Comments

@tjx666
Copy link

tjx666 commented Apr 5, 2023

  • Rollup Plugin Name: @rollup/plugin-node-resolve
  • Rollup Plugin Version: 15.0.2
  • Rollup Version: 3.7.5
  • Operating System (or Browser): MacOS 13.3 Ventura
  • Node Version: 18.5.0
  • Link to reproduction (⚠️ read below): https://stackblitz.com/edit/rollup-repro-t8bmex

Expected Behavior

node packages/app/src/main.js works fine:

image

Built by vite is also works, because vite use self vite:resolve plugin:

pnpm -F app build:vite:

Uploading image.png…

Rollup should build without warnings.

Actual Behavior

But rollup can't resolve:

image

Additional Information

This issue is found when I test package.exports field:

{
  "name": "utils",
  "type": "module",
  "exports": {
    "./a/*/c": "./abc.js"
  }
}
@stale stale bot added the x⁷ ⋅ stale label Jun 10, 2023
@stale
Copy link

stale bot commented Jun 11, 2023

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

@stale stale bot closed this as completed Jun 11, 2023
@tjx666
Copy link
Author

tjx666 commented Jun 11, 2023

@lukastaegert can you help to look into this issue?

@robbiespeed
Copy link

it appears to be broken if anything comes after *, even this does not work:

  "exports": {
    "./*.js": {
      "types": "./lib/*.d.ts",
      "import": "./lib/*.js"
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants