Skip to content

Adding intellisense support for node import mapping and subpath imports #128064

@MaxTechnics

Description

@MaxTechnics

A feature in node 14 is you can define imports in your package.json and alias your relative paths in your package.json. It would be great if intellisense resolves these so using them would be even better.

An example of package.json imports:

{
  "name": "",
  "version": "1",
  "description": "",
  "main": "index.js",
  "scripts": {},
  "keywords": [],
  "author": "",
  "license": "",
  "dependencies": {},
  "devDependencies": {},
  "imports": {
    "#utils/*": "./utils/*",
    "#colors": "./commanddata/colors.json"
  }
}

You would be able to use these in your requires. (require('#utils/myUtil.js');)

Metadata

Metadata

Assignees

Labels

javascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions