Closed
Description
- VSCode Version: 1.44.2
- OS Version: macOS 10.14.6
A while back, the importModuleSpecifierEnding
preference was added to specify the preferred path ending for auto imports (see microsoft/vscode#90405).
{
"javascript.preferences.importModuleSpecifierEnding": "js",
}
While this seems to work with auto imports (i.e. referencing an export of another file and letting the editor perform module importing automatically), it does not work with path completions when typing the import statement manually.
import { someFunction } from '../|';
^ when picking a file from path suggestions here,
the file extension seems to always be omitted
Actual Behavior:
import { someFunction } from '../someModule';
Expected Behavior:
import { someFunction } from '../someModule.js';
Steps to Reproduce:
- Set
javascript.preferences.importModuleSpecifierEnding
to"js"
- Start typing an import statement of a relative js module
- When specifying the import source, choose a relative file path from the completions list
- The ".js" extension appears to be omitted
Expected Behavior:
The file chosen from the suggestions list should have the ".js" extension.
Does this issue occur when all extensions are disabled?: Yes