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

[BUG] subpath-patterns does not work correctly #16

Closed
chenyulun opened this issue Feb 17, 2022 · 0 comments
Closed

[BUG] subpath-patterns does not work correctly #16

chenyulun opened this issue Feb 17, 2022 · 0 comments

Comments

@chenyulun
Copy link

https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#subpath-patterns

"exports": {
    "./features/*": "./src/features/*.js",
    "./features/private-internal/*": null
}
console.log(resolve(contents, './features/private-internal/m')); // no error
// Expect the result
// Throws: ERR_PACKAGE_PATH_NOT_EXPORTED
"exports": {
    "./features/private-internal/*": null
    "./features/*": "./src/features/*.js",
}
console.log(resolve(contents, './features/private-internal/m'));
// => Error: No known conditions for "./features/private-internal/m" entry in "foobar" package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant