Closed
Description
- VSCode Version: classic 1.52.1 and 1.53.0-insider
- OS Version: Windows 10 pro - 20H2
Steps to Reproduce:
- Clone that repo
- Run, npm install
- Verify your VSCode module import preference is setup is "shortest"
- Open main.ts and observe line 5, the ideal shortest import (manually typed by me)
import { BasicDTO } from "@repro-short-import/data";
- Open now app.component.ts and try to auto import
BasicDTO
from shared lib with ctrl+space. - Optionnaly, use CTRL+. to try different import style and see that shortest is definitly not the first. Instead an absolut longer path is used
import { BasicDTO } from 'libs/data/src/lib/data';
It is not due to the string length cause I got other repos where lib name is shorter than @repro-short-import/data
;
Does this issue occur when all extensions are disabled?: Yes
I'm using the insider version for every day coding and I downloaded the last clean and fresh vscode classic version to test this. These errors are occurring on both.
Using other type of import module specifier will eventually solve this issue but will cause some others => always use absolute path even for file which should be relatively imported.