-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"typescript.preferences.importModuleSpecifier": "project-relative" is not as intended #58114
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.88.0. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
/needsMoreInfo |
Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue. Happy Coding! |
Can confirm it doesn't work as intended and makes imports from absolute path instead of project relative. It started working like this after the latest update. Current behaviour: When importing functions from a current project, vscode makes the following import: import { createMarkerElement } from "apps/client/src/pages/MainPage/useVehiclesLayer/createMarkerElement"; Expected behaviour: import { createMarkerElement } from "./createMarkerElement"; |
This comment has been minimized.
This comment has been minimized.
Can someone please provide an example repo with reproduction steps that show this happening? |
@andrewbranch created an example here https://github.com/ivan-palatov/vscode-typescript-imports-bug On the first try everything worked fine tho, but after I changed typescript version - it broke. Not sure why. I thought it had something to do with not being on the latest version, but right now on a project Im working on it is still happening even on the latest ts version. Edit: If I swith typescript in vscode to workspace version (5.4.4 instead of vscode's 5.4.3) everything works fine, at least right now. |
Thanks @ivan-palatov! I’m going to close this as fixed, but if anyone can reproduce on 5.4/nightly TS, please comment with repro steps and I’ll reopen and investigate more. I’m guessing this bug was accidentally fixed by code shuffling around in #55015. |
"typescript.preferences.importModuleSpecifier": "project-relative" is not working properly anymore after the new update. I tested this for Nx projects.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: