Skip to content

Styles are getting duplicated in development mode #283

Closed
@just-boris

Description

@just-boris

I have the following files:

common.css

.test {
    color: purple; /* just some styles to test */
}

component.css

@import './common.css';

styles.css

@import "./common.css";
@import "./component.css";

In the output bundle I have the following:

.test {
    color: purple;
}

.test {
    color: purple;
}

The references to common.css are not merged and the content is rendered twice. This happening only in mode: "development", and is actually caused by NamedModulesPlugin. Removing this module from config fixes the issue.

P.S. there is a repository, that you can checkout locally and reproduce the issue: https://github.com/just-boris/mini-css-extract-plugin-283

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