From fef75bdfc9955d10fbf130c0e328ba0cad8b072e Mon Sep 17 00:00:00 2001 From: Michael Haschke Date: Mon, 31 Aug 2026 13:14:52 +0200 Subject: [PATCH 1/2] =?UTF-8?q?add=20workaround=20for=20problem=20of=20BOM?= =?UTF-8?q?=20selector=20within=20compressed=20sty=C3=B6esheets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/_bom-workaround.scss | 28 ++++++++++++++++++++++++++++ src/index.scss | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 src/_bom-workaround.scss diff --git a/src/_bom-workaround.scss b/src/_bom-workaround.scss new file mode 100644 index 000000000..bb47a3c14 --- /dev/null +++ b/src/_bom-workaround.scss @@ -0,0 +1,28 @@ +.bom-problem-workaround-dummy-rule { + /** + * This is a workaround to prevent the loss of the first rule of our compressed CSS. + * + * Sass emits a BOM instead of a `@charset` rule when it creates a compressed + * stylesheet that contains non-ASCII characters. + * Postcss preserves that BOM since v8.5.24, before that it silently dropped it. + * Css-loader does not remove it, although it inlines the CSS into a JS string that + * style-loader writes into a `