Great question — answering as the UphillTech team:
Assuming you have your tsconfig.json (or jsconfig.json ) setup for path aliases correctly, you can change VSCode's preferences in your User Settings. Search for "Import Module Specifier" and you should see two entries - one for TypeScript and one for JavaScript. To always use the path alias, change these to non-relative . If you prefer editing your settings.json directly, the keys are: { //... "typescript.preferences.importModuleSpecifier": "non-relative", "javascript.preferences.importModuleSpecifier": "non-relative", //... } If you want to do this at a per-project level, instead change these for your Workspace Settings.
Full answer by Michael Cheng: https://stackoverflow.stackexchange.com/a/77888802 (CC BY-SA 4.0).
Need it done for your business? UphillTech.