Skip to content

[scss] "Follow link" on @use/@import statements with absolute paths not working with node_modules. #245579

Open

Description

When Ctrl+Click (Follow link) is used on @use and/or @import statement paths, VSCode only ever attempts to resolve them as if they were relative. Eg. the example below will make VSCode attempt to open a non-existing file located at src/bootstrap.scss.variables.scss instead of looking for a bootstrap module in node_modules (itself located at the project root), which is what the scss compiler correctly does.

// src/app.scss
@import 'bootstrap/scss/variables';

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.98.2
  • OS Version: Windows 11

Steps to Reproduce:

  1. Create/open any node project
  2. Install any scss framework (for demo purposes, use bootstrap)
  3. Create any scss file anywhere (probably your src/source folder though)
  4. Write a use or import statement using said scss framework, as above
  5. Ctrl+click on the path in the import statement

Activity

  1. miss-programgamer commented on Apr 14, 2025

    @miss-programgamer
    Author

    More information: it does work when in a WSL remote session, so this somehow seems to be platform-dependent.

  2. added
    css-less-scss
    bug
    help wanted
    on Apr 14, 2025
  3. IsaacTian05 commented on Apr 26, 2025

    @IsaacTian05

    Hello I have create a PR for this issue, PTAL anyone involved
    microsoft/vscode-css-languageservice#440

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcss-less-scsshelp wanted

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions