Skip to content

Commit

Permalink
cherry pick(#7073): Fix Mojibake (#7076)
Browse files Browse the repository at this point in the history
Fix mojibake (#7073)

Add charset preamble to generated css
  • Loading branch information
akhenry committed Sep 21, 2023
1 parent 28e4453 commit af4ef8c
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 af4ef8c

Please sign in to comment.