Skip to content

sass-resources-loader and css-modules 'composes'Β #57

@t22james

Description

@t22james

I'm having an issue when trying to use the css-modules functionality 'composes', like:

_vars.scss

$font-weight-bold: 900;

type.scss

.bold{
    font-weight: $font-weight-bold;
}

example.scss

.exampleHeading{
   composes: bold from './type.scss';
}

the issue seems to be that at the time css-modules processes type.scss as part of the compose, the variables used in type.scss (which are otherwise used/available via sass-resources-loader when using a class from type.scss directly from js), don't seem to be available...

or putting this another way, is there a way for sass-resources-loader to be making the vars from a settings file available to css-modules during it's composes functionality?

Am I the only one who's tried to compose from a file that is dependent on sass-resources-loader enabled vars?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions