Skip to content

This breaks @import in Parcel #107

@maxnordlund

Description

@maxnordlund

Parcel (and maybe other tools) is very picky where @import rules are allowed, otherwise you get this error message:

🚨 @parcel/transformer-css: @import rules must precede all rules aside from @charset and @layer statements

I tracked down the culprit being this plugin, which prepends @font-face rules to the very top here:

// prepend the font face rules
root.prepend(fontFaceRules);

Unfortunately I'm not familiar enough to fix it myself, but it would be nice if the @font-face rules where inserted just after the @import rules instead.

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