Skip to content

Build fails when bundling css, Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin #3

@au-re

Description

@au-re

I get the following error when running react-app-rewired build --library:

/src/components/Button/Button.css
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example

The css is imported as: import "./Button.css".

Replacing

config.plugins=[ ]

with

config.plugins = [
 new ExtractTextPlugin("styles.css"),
];

seems to solve the problem..

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