Add [stylelint] prefix to CLI output for better debugging #270
Closed
Description
Modification Proposal
If an error occurs while building, the current error messages don't specify where the error message came from. Here's an example output that I encountered today:
❯ yarn dev
yarn run v1.22.18
$ webpack server --port 3000
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:3000/
<i> [webpack-dev-server] On Your Network (IPv4): http://10.0.0.3:3000/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:3000/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/ben/src/commscheck/which-roles/public' directory
[BABEL] Note: The code generator has deoptimised the styling of /Users/ben/src/commscheck/which-roles/node_modules/react-dom/cjs/react-dom.development.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /Users/ben/src/commscheck/which-roles/node_modules/lodash/lodash.js as it exceeds the max of 500KB.
asset main.js 1.83 MiB [emitted] (name: main)
asset index.html 339 bytes [emitted]
runtime modules 27.4 KiB 13 modules
modules by path ./node_modules/ 1.62 MiB 40 modules
modules by path ./src/ 27.8 KiB
modules by path ./src/components/ 16.6 KiB 10 modules
modules by path ./src/styles/*.css 7.14 KiB
./src/styles/main.css 2.66 KiB [built] [code generated]
+ 4 modules
modules by path ./src/app/ 3.88 KiB
./src/app/app.tsx 550 bytes [built] [code generated]
+ 2 modules
./src/index.tsx 195 bytes [built] [code generated]
ERROR in No configuration provided for /Users/ben/src/commscheck/which-roles/src/app/app.module.css
webpack 5.72.0 compiled with 1 error in 2955 ms
From the above output I couldn't tell if this error was coming from stylelint
, css-loader
, style-loader
, postcss
, webpack
itself, or some other source.
I propose prepending [stylelint]
to the CLI output of stylelint-webpack-plugin
to make debugging in this sort of situation easier.
Expected Behavior / Situation
CLI output (especially errors) of stylelint-webpack-plugin
are easily identifiable as coming from this plugin.
Actual Behavior / Situation
CLI output provides no hints to its source.
Please paste the results of npx webpack-cli info
here, and mention other relevant information
❯ npx webpack-cli info
System:
OS: macOS 12.2.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 8.49 GB / 64.00 GB
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: 1.22.18 - /usr/local/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
Browsers:
Chrome: 100.0.4896.127
Safari: 15.3
Safari Technology Preview: 15.4
Packages:
babel-loader: ^8.2.3 => 8.2.4
css-loader: ^6.7.1 => 6.7.1
css-modules-typescript-loader: ^4.0.1 => 4.0.1
html-webpack-plugin: ^5.5.0 => 5.5.0
postcss-loader: ^6.2.1 => 6.2.1
style-loader: ^3.3.1 => 3.3.1
stylelint-webpack-plugin: ^3.2.0 => 3.2.0
webpack: ^5.64.1 => 5.72.0
webpack-cli: ^4.9.1 => 4.9.2
webpack-dev-server: ^4.5.0 => 4.8.1
Metadata
Assignees
Labels
No labels