Does this issue occur when all extensions are disabled?: Yes/No
1.107.0
618725e67565b290ba4da6fe2d29f8fa1d4e3622
arm64
Given the following package.json of a package within a monorepo using Bun workspaces,
{
"name": "@example/shared",
"type": "module",
"exports": {
".": "./src/index.js"
},
"private": true,
"devDependencies": {
"@types/bun": "catalog:"
},
"peerDependencies": {
"typescript": "catalog:"
}
}
VS Code will provide different import suggestions based on the structure of this module:
- If all of this module's code lives within
src/index.ts, attempting to import an identifier from a sibling package will result in VS Code only suggesting @example/shared as the import path.
- If the package has several files whose identifiers are re-exported from
index.ts, VS Code will suggest, in addition to the named import, relative imports to any file (re-)exporting the identifier (e.g., the file the identifier is defined in plus any other intermediate re-exporting index.ts files)
The expected behavior here would be for VS Code to not offer the relative imports.