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

feat: add experimental support for Node.js subpath imports #49

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

fraxken
Copy link
Member

@fraxken fraxken commented Jun 4, 2022

Add initial support of Node.js subpath imports (see https://nodejs.org/api/packages.html#subpath-imports).

const foo = require("#dep");

And in package.json:

{
  "imports": {
    "#dep": {
      "node": "kleur"
    }
  }
}

So in the code foo is equal to kleur dependency.

@fraxken fraxken merged commit 6bae237 into master Jun 6, 2022
@fraxken fraxken deleted the node-import-alias branch June 6, 2022 13:14
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

Successfully merging this pull request may close these issues.

1 participant