Absolute SCSS import resolving inconsistency #2517
Labels
bug
Something isn't working
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
Issue description
I have noticed an inconsistency in the linked file resolving in css code between VSCodes native
.scss
resolving and the behavior in.vue
files when using absolute URLs.In
.scss
files without any plugins installed, I can click the filepath and the desired file opens.@import "/src/lib/styles/interactivity.scss";
But when removing the leading
/
it's not working anymore@import "src/lib/styles/interactivity.scss";
I think this is, because when leading slash is missing, it's treated for some reason as a relative import. At least the resolved path I can see in the filepath bar of VSCode gives me that feeling.
However in
.vue
SFC files (withVue Language Features (Volar)
(Vue.volar
) installed) the behavior is flipped.is working just fine and clicking the filepath opens it. But with the leading
/
the filepath is appended to the workspace path without a/
in between.(notice the
afiliosrc
)Troubleshooting Steps I've done so far:
vscode-css-languageservice
should be used. However there is a difference - or I misunderstood something. I also couldn't figure out howhttps://github.com/volarjs/plugins/blob/master/packages/css/src/index.ts#L125
plays into that. It felt related, butI didn't quite understand the general structure how all systems interact with each other.Desires solution
.scss
and.vue
SFCs. I wouldn't care if it requires a different syntax for absolute imports, it should just be consistent.Please let me know if you need more details or I should post the issue somewhere else because it isn't directly caused by this package. I would love to support here, but couldn't figure out how to move things forward myself anymore.
The text was updated successfully, but these errors were encountered: