vscode-scss icon indicating copy to clipboard operation
vscode-scss copied to clipboard

Support tsconfig paths alias

Open cncolder opened this issue 5 years ago • 5 comments

Most frontend project use tsconfig paths. And import scss like this @import '@/style/theme';.

// tsconfig.json
{
    "compilerOptions": {
        "paths": {
            "@/*": ["./src/*"]
        }
    }
}

cncolder avatar Mar 15 '20 17:03 cncolder

jsconfig would be nice too

abreu-dev avatar Apr 03 '20 23:04 abreu-dev

Yes please add the tsconfig !

Mushr0000m avatar Oct 07 '20 09:10 Mushr0000m

Please add support for the tsconfig.json path alias.

avlaguta avatar Mar 23 '23 17:03 avlaguta

Is this possible? I can't Ctrl-click / Command-click any aliased imports. VSCode tries to create a new file.

Although I like the other features, I installed this extension to solve this particular annoyance specifically. I'm really bummed that it doesn't.

Apparently Visual Studio Code assumes all @import files are relative by default and doesn't recognize aliases defined in tsconfig or jsconfig even though webpack does and correctly resolves them. I hoped this extension would override VS Code's default behavior and fix this annoyance.

ADTC avatar Sep 14 '23 13:09 ADTC