Skip to content

Javascript intellisense import should respect field package.json/module #30060

@pmunin

Description

@pmunin

Package.json file has a field "module" (proposal). When I edit package.json, vscode obviously aware of this field as it shows description for it:
image

However when I try to import this package from another module, intellisense only uses package.json/main to obtain exports, ignoring field module, which supposed to override main in case of module importing. Usually main points to a bundle (e.g. generated by webpack), which does not export jsdoc the right way.

Please support package.json/module field, so when developer specifies it, intellisense will use that over package.json/main to obtain exported symbols.

Metadata

Metadata

Assignees

Labels

DuplicateAn existing issue was already created

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions