Skip to content

Offer auto-imports for all files in package.json exports wildcard directories #53116

Closed
@pilaoda

Description

@pilaoda

My npm lib module's package.json

  "name": "my-lib",
  "exports": {
        ".": {
            "require": "./dist/index.js",
            "types": "./dist/index.d.ts"
        },
        "./*": {
            "require": "./dist/*.js",
            "types": "./dist/*.d.ts"
        },
        "./**/*": {
            "require": "./dist/**/*.js",
            "types": "./dist/**/*.d.ts"
        }
    },

An app depends on this npm module and install it.
The vscode auto import only support types in import {A} from "my-lib" resolve to my-lib/dist/index.d.ts, and could not find the symbol and type in something like import {B} from "my-lib/utils" resolve to my-lib/dist/utils.d.ts.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions