Gathering detailed insights and metrics for @soda/friendly-errors-webpack-plugin
Gathering detailed insights and metrics for @soda/friendly-errors-webpack-plugin
Gathering detailed insights and metrics for @soda/friendly-errors-webpack-plugin
Gathering detailed insights and metrics for @soda/friendly-errors-webpack-plugin
Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience.
npm install @soda/friendly-errors-webpack-plugin
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
42 Stars
172 Commits
5 Forks
2 Watchers
1 Branches
2 Contributors
Updated on Jun 02, 2024
Latest Version
1.8.1
Package Id
@soda/friendly-errors-webpack-plugin@1.8.1
Unpacked Size
26.87 kB
Size
9.17 kB
File Count
17
NPM Version
6.14.15
Node Version
12.22.7
Published on
Nov 15, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
1
24
Friendly-errors-webpack-plugin recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience.
It is easy to add types of errors so if you would like to see more errors get handled, please open a PR!
1npm install @soda/friendly-errors-webpack-plugin --save-dev
Simply add FriendlyErrorsWebpackPlugin
to the plugin section in your Webpack config.
1var FriendlyErrorsWebpackPlugin = require('@soda/friendly-errors-webpack-plugin'); 2 3var webpackConfig = { 4 // ... 5 plugins: [ 6 new FriendlyErrorsWebpackPlugin(), 7 ], 8 // ... 9}
You need to turn off all error logging by setting your webpack config quiet option to true.
1app.use(require('webpack-dev-middleware')(compiler, { 2 // ... 3 logLevel: 'silent', 4 // ... 5}));
If you use the webpack-dev-server, there is a setting in webpack's devServer
options:
1// webpack config root 2{ 3 // ... 4 devServer: { 5 // ... 6 quiet: true, 7 // ... 8 }, 9 // ... 10}
If you use webpack-hot-middleware, that is done by setting the log option to false
. You can do something sort of like this, depending upon your setup:
1app.use(require('webpack-hot-middleware')(compiler, { 2 log: false 3}));
Thanks to webpack-dashboard for this piece of info.
You can pass options to the plugin:
1new FriendlyErrorsPlugin({
2 compilationSuccessInfo: {
3 messages: ['You application is running here http://localhost:3000'],
4 notes: ['Some additional notes to be displayed upon successful compilation']
5 },
6 onErrors: function (severity, errors) {
7 // You can listen to errors transformed and prioritized by the plugin
8 // severity can be 'error' or 'warning'
9 },
10 // should the console be cleared between each compilation?
11 // default is true
12 clearConsole: true,
13
14 // add formatters and transformers (see below)
15 additionalFormatters: [],
16 additionalTransformers: []
17})
The plugin has no native support for desktop notifications but it is easy to add them thanks to node-notifier for instance.
1var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin'); 2var notifier = require('node-notifier'); 3var ICON = path.join(__dirname, 'icon.png'); 4 5new FriendlyErrorsPlugin({ 6 onErrors: (severity, errors) => { 7 if (severity !== 'error') { 8 return; 9 } 10 const error = errors[0]; 11 notifier.notify({ 12 title: "Webpack error", 13 message: severity + ': ' + error.name, 14 subtitle: error.file || '', 15 icon: ICON 16 }); 17 } 18 })
Webpack's errors processing, is done in four phases:
You can add transformers and formatters. Please see transformErrors, and formatErrors in the source code and take a look a the default transformers and the default formatters.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
83 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More