Skip to content

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.

2 participants