Skip to content

onImport argument includes top-level (importing) file #234

@jmm

Description

@jmm

Hello,

With postcss@5.2.5 and postcss-import@8.1.2 I'm getting the top level file that's passed to postcss in the argument to onImport, which is not what I expect. It's documented as:

array of imported files

Which I interpet as: the files referenced by @import rules.

So say I have 2 files like this:

top-level.css

@import "./imported.css";

imported.css

/* */

In onImport I get an array containing the paths for both files.

Is that intentional? If so, can you please document it. And if that's the case, can you commit to it always being the first element in the array?

Thanks!

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