Skip to content

SCSS - Importing SCSS variables globally breaks exported TS type to {}. #152

Closed
@mthines

Description

@mthines

Thanks for the awesome TS plugin! 💪

Describe the bug
There's certain cases when using SASS where you need the value of a variable and need to wrap it in #{} in order to get the variable output and not the variable name.

When adding #{} to a *.module.scss, the file's classNames etc are no longer exported and only shows {} in the TS file.

To Reproduce

Add the following to any *.module.scss file, and try and import it to a TS file.

container.module.scss

@use "variables" as *; // Which includes $breakpoint

.container {
  @media (min-width: #{$breakpoint}) {
    color: red;
  }
}

Expected behavior
Using the #{} functionality shouldn't remove the classNames.

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Chrome
  • Version: 96.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions