Skip to content

Webpack 4 and mini-css-extract-plugin issue with toolbox css importΒ #68

@AndreasSchouten

Description

@AndreasSchouten

I'm upgrading my project to webpack 4 and use the new recommended mini-css-extract-plugin.

When importing a toolbox class i.E.

import Switch from 'react-toolbox/lib/switch';
(or import {Switch} from 'react-toolbox/lib/switch';)

I get this error:


ERROR in ../node_modules/react-toolbox/lib/button/theme.css
Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ../node_modules/css-loader/index.js):
Error: composition is only allowed when selector is single :local class name not in ".raised", ".raised" is weird

Also this error is thrown if I use an import in an css file like:
@import "react-toolbox/lib/button/theme.css";

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