fix: workaround for broken styles by BOM chars with postcss >=8.5.24 with mini-css-extract-plugin - #798
Merged
Conversation
Antreesy
approved these changes
Aug 4, 2026
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
ShGKme
enabled auto-merge
August 4, 2026 14:00
Merged
nodiscc
added a commit
to nodiscc/Shaarli
that referenced
this pull request
Aug 6, 2026
- disable sass charset to prevent BOM in compiled CSS - Dart Sass emits a UTF-8 BOM for CSS files containing non-ASCII characters in production (compressed) mode - PostCSS 8.5.24+ preserves BOMs (byte-fidelity fix, see postcss/postcss#2122). - The BOM corrupts @font-face selectors (e.g. \uFEFF@font-face), causing browsers to ignore them and not load font assets - Fixes shaarli#2248 - Patch inspired by: nextcloud-libraries/webpack-vue-config#798
nodiscc
added a commit
to nodiscc/Shaarli
that referenced
this pull request
Aug 9, 2026
- disable sass charset to prevent BOM in compiled CSS - Dart Sass emits a UTF-8 BOM for CSS files containing non-ASCII characters in production (compressed) mode - PostCSS 8.5.24+ preserves BOMs (byte-fidelity fix, see postcss/postcss#2122). - The BOM corrupts @font-face selectors (e.g. \uFEFF@font-face), causing browsers to ignore them and not load font assets - Fixes shaarli#2248 - Patch inspired by: nextcloud-libraries/webpack-vue-config#798
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PostCSS v8.5.24 breaks styles with default
sassoptions if they contain non-ASCII characters.@layerat rule postcss/postcss#2122css-loaderissue: Leading BOM from a loader-generated module survives into the middle of concatenated CSS (postcss 8.5.24) webpack/css-loader#1678css-loaderfix: fix: strip BOM before process via PostCSS for 8.5.24 webpack/css-loader#1679mini-css-extract-plugin🤖 AI (if applicable)