Skip to content

class names not scoped using the "use" api #50

Closed
@themitchy

Description

@themitchy

If any plugins are specified via the use option, class names will not be scoped. Worse yet it's not plugin specific because an empty array still results in no scoping of classnames.

css:

.widget {
  display: flex;
}

plugin configuration:

b.plugin(cssModulesify, {
   rootDir: '../',
   output: './dist/foo.css',
   use: [ autoprefixer ]
});

With the above the generated css is:

.widget {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: -ms-inline-flexbox;
  display: inline-flex;
}

With use: [ ] the class name is still not scoped. With use completely removed the class will be scoped correctly.

Seems like css-modules + plugins is too common a use case to not support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions