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 b8949db commit 05c7a81
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 @@ -110,6 +110,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 05c7a81

Please sign in to comment.