Skip to content

@charset matching issue in v14 #484

@AlecRust

Description

@AlecRust

If I use postcss-import v14 I get the following warning:

postcss-import: @charset must precede all other statements

I see this was introduced in #447. Looks like my charsets aren't being merged in to one at the top.

Looking at my stylesheet, there are multiple charsets, but the only difference is the casing i.e.

@charset "utf-8";

.blah {
  color: #5200d0;
}

@charset "UTF-8";

.blah {
  color: #5200d0;
}

I wonder if this should be handled by postcss-import i.e. including just one @charset at the top without an error?

Otherwise I'm not sure what the "fix" here is, these are 3rd party stylesheets being merged in to one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions