-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
[Feature request] self-referencing should work without "exports"
#50334
Comments
Ah, thanks. That's not great, considering that I'd like to avoid having extras that I don't need, like |
Is it viable to make this a feature request? Or is there a complication with allowing it without |
@nodejs/loaders |
exports is only optional because there’s no backwards compatible way to add it by default - every package should have it. “vanilla ESM” works a similar way in the sense that you choose which files to deploy, and thus which are exposed to the web. Self-reference uses “exports” paths, so I’m not sure how it’d make sense to have it without exports being present. |
I think you should be able to create an "exports": {
".": "./dist/kiwi.js",
"./*": "./*"
} |
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-stale
|
Version
v20.5.0
Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem
npm 10.2.0
What steps will reproduce the bug?
This build shows the problem:
https://github.com/lume/kiwi/actions/runs/6609081452
This commit:
lume/kiwi@45fa466
To reproduce the error:
Output after that will be:
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior? Why is that the expected behavior?
Self-referencing imports should work
What do you see instead?
it fails
Additional information
The issue can be temporarily worked around by making a symlink, like so:
After this,
node_modules/@lume/kiwi
will be a link back up to kiwi itself, andnpm run bench
will work.The text was updated successfully, but these errors were encountered: