-
-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Description
Details
When using a postcss plugin that may report warnings (e.g. postcss-custom-properties when it can't find the var definition, or stylelint in postcss plugin mode), the warnings are not emitted according to the webpack3+ API that requires that all warnings be instances of Error.
Error (Logs|Stacks)
WARNING in .../node_modules/css-loader??ref--13-1!.../node_modules/postcss-loader/lib??ref--13-2!./.../style.css
(Emitted value instead of an instance of Error) stylelint: ./.../style.css:35:20: Expected a trailing semicolon (declaration-block-trailing-semicolon)
@ ./.../style.css 2:14-159 21:1-42:3 21:157-42:2 22:19-164
@ ./.../index.tsx
...
@ multi (webpack)-dev-server/client?https://localhost:8080 webpack/hot/dev-server .
Reproduction [Code]
A stylelint-as-plugin setup which config just { "extends": "stylelint-config-standard" }
is probably enough to trigger warnings even on an empty CSS file.
To clarify, the problem is that whenever a warning from postcss is printed, it is always prefixed by a warning from webpack saying (Emitted value instead of an instance of Error)
, although I could also add a feature request for nicely formatted errors like postcss-reporter
does :)
airtonix, Nemo64, katywings, pattiereaves, maxleaver and 1 more