I have this in my webpack.config.js
:
...
rules: [
{
test: /\.s[ac]ss$/i,
exclude: '/node_modules/',
use: [
// 'style-loader',
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: { url: false },
},
{
loader: 'sass-loader',
options: {
implementation: require('sass'),
},
},
],
},
]
...
Even though sass-loader
uses dart-sass
, I can't see the same dart-sass
style warnings:
Warning on line 5, column 1 of src/styles/dir/_partial.sass:
This selector doesn't have any properties and won't be rendered.
╷
5 │ asdf
│ ^^^^
╵
If it shows a warning, then this is what I get (some warnings are ignored):
This selector doesn't have any properties and won't be rendered.
null
@ ./src/styles/main.sass
I simply can't even know where is the warning coming from.
I tried getting an error, and it is pretty much 1:1 but without pretty colors. So errors are cool, but warnings are different for some reason. I use the same JS package directly and through sass-loader
+ webpack --watch
.