Skip to content

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

@tjx666

Description

@tjx666
  • 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"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions