cherry pick(#7073): Fix Mojibake (#7076)

Fix mojibake (#7073)

Add charset preamble to generated css
This commit is contained in:
Andrew Henry 2023-09-21 11:05:39 -07:00 committed by GitHub
parent 28e4453218
commit af4ef8c0ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: {