Skip to content

Duplicate imports are resolved in the wrong order #211

@simonsmith

Description

@simonsmith

Not sure if this title is accurate, feel free to rename.

Given two files:

componentA.css

@import "suitcss-components-button";

.ComponentA {
  color: red;
}

index.css

@import "./componentA.css";
@import "suitcss-components-button";

I would expect that even though components-button is at the bottom in index it would see that componentA requires it as a dependency and would place the Button CSS above the ComponentA CSS in the final output. This does not happen:

**output

.ComponentA {
  color: red;
}
/** @define Button */
// etc

If I install postcss-import@7.1.3 and run the test again the output is as expected, with components-button first and the component code after it.

Is this a regression perhaps?

Cheers

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