Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,23 @@
},
RULE_SCSS: {
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
use: [
'style-loader',
'css-loader',
{
loader: 'sass-loader',
options: {
sassOptions: {
// Sass emits BOM for CSS files with non-ASCII characters in production build by default
// PostCSS (used in css-loader and Vue SFC compiler) starting from v8.5.24 stops removing BOM
// Merging these styles keeps BOM in the middle of the file, breaking the first selector of each merged stylesheet
// Disabling charset prevents breaking styles (a workaround until css-loader is fixed for the new PostCSS)
// This is safe since the document has "<meta charset="utf-8">" anyway
charset: false,
},
},
},
],
},
RULE_VUE: {
test: /\.vue$/,
Expand All @@ -33,4 +49,4 @@
test: /\.(png|jpe?g|gif|svg|woff2?|eot|ttf)$/,
type: 'asset/inline',
},
}
}
Loading