Skip to content

Commit

Permalink
Fix mojibake (#7073)
Browse files Browse the repository at this point in the history
Add charset preamble to generated css
  • Loading branch information
akhenry committed Sep 21, 2023
1 parent b923af8 commit c8ef2a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ const config = {
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[name].css'
}),
// Add a UTF-8 BOM to CSS output to avoid random mojibake
new webpack.BannerPlugin({
test: /.*Theme\.css$/,
raw: true,
banner: '@charset "UTF-8";',
})
],
module: {
Expand Down

0 comments on commit c8ef2a6

Please sign in to comment.