{
  "_id": "@soda/friendly-errors-webpack-plugin",
  "maintainers": [
    {
      "name": "soda",
      "email": "haoqunjiang+npm@gmail.com"
    },
    {
      "name": "fangbinwei",
      "email": "fangbinwei@yeah.net"
    }
  ],
  "keywords": [
    "friendly",
    "errors",
    "webpack",
    "plugin"
  ],
  "dist-tags": {
    "latest": "1.8.1"
  },
  "author": {
    "name": "Geoffroy Warin"
  },
  "_rev": "5-695e5b6afbc71c9c36b47e42b297d633",
  "description": "Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience",
  "readme": "# Friendly-errors-webpack-plugin\n\n[![npm](https://img.shields.io/npm/v/@soda/friendly-errors-webpack-plugin.svg)](https://www.npmjs.com/package/@soda/friendly-errors-webpack-plugin)\n[![Build Status](https://travis-ci.org/sodatea/friendly-errors-webpack-plugin.svg?branch=master)](https://travis-ci.org/sodatea/friendly-errors-webpack-plugin)\n[![Build status](https://ci.appveyor.com/api/projects/status/bbrt7hmp6lav3erh/branch/master?svg=true)](https://ci.appveyor.com/project/sodatea/friendly-errors-webpack-plugin/branch/master)\n\nFriendly-errors-webpack-plugin recognizes certain classes of webpack\nerrors and cleans, aggregates and prioritizes them to provide a better\nDeveloper Experience.\n\nIt is easy to add types of errors so if you would like to see more\nerrors get handled, please open a [PR](https://help.github.com/articles/creating-a-pull-request/)!\n\n## Getting started\n\n### Installation\n\n```bash\nnpm install @soda/friendly-errors-webpack-plugin --save-dev\n```\n\n### Basic usage\n\nSimply add `FriendlyErrorsWebpackPlugin` to the plugin section in your Webpack config.\n\n```javascript\nvar FriendlyErrorsWebpackPlugin = require('@soda/friendly-errors-webpack-plugin');\n\nvar webpackConfig = {\n  // ...\n  plugins: [\n    new FriendlyErrorsWebpackPlugin(),\n  ],\n  // ...\n}\n```\n\n### Turn off errors\n\nYou need to turn off all error logging by setting your webpack config quiet option to true.\n\n```javascript\napp.use(require('webpack-dev-middleware')(compiler, {\n  // ...\n  logLevel: 'silent',\n  // ...\n}));\n```\n\nIf you use the webpack-dev-server, there is a setting in webpack's ```devServer``` options:\n\n```javascript\n// webpack config root\n{\n  // ...\n  devServer: {\n    // ...\n    quiet: true,\n    // ...\n  },\n  // ...\n}\n```\n\nIf 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:\n\n```javascript\napp.use(require('webpack-hot-middleware')(compiler, {\n  log: false\n}));\n```\n\n_Thanks to [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard) for this piece of info._\n\n## Demo\n\n### Build success\n\n![success](http://i.imgur.com/MkUEhYz.gif)\n\n### eslint-loader errors\n\n![lint](http://i.imgur.com/xYRkldr.gif)\n\n### babel-loader syntax errors\n\n![babel](http://i.imgur.com/W59z8WF.gif)\n\n### Module not found\n\n![babel](http://i.imgur.com/OivW4As.gif)\n\n## Options\n\nYou can pass options to the plugin:\n\n```js\nnew FriendlyErrorsPlugin({\n  compilationSuccessInfo: {\n    messages: ['You application is running here http://localhost:3000'],\n    notes: ['Some additional notes to be displayed upon successful compilation']\n  },\n  onErrors: function (severity, errors) {\n    // You can listen to errors transformed and prioritized by the plugin\n    // severity can be 'error' or 'warning'\n  },\n  // should the console be cleared between each compilation?\n  // default is true\n  clearConsole: true,\n\n  // add formatters and transformers (see below)\n  additionalFormatters: [],\n  additionalTransformers: []\n})\n```\n\n## Adding desktop notifications\n\nThe plugin has no native support for desktop notifications but it is easy\nto add them thanks to [node-notifier](https://www.npmjs.com/package/node-notifier) for instance.\n\n```js\nvar FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');\nvar notifier = require('node-notifier');\nvar ICON = path.join(__dirname, 'icon.png');\n\nnew FriendlyErrorsPlugin({\n    onErrors: (severity, errors) => {\n      if (severity !== 'error') {\n        return;\n      }\n      const error = errors[0];\n      notifier.notify({\n        title: \"Webpack error\",\n        message: severity + ': ' + error.name,\n        subtitle: error.file || '',\n        icon: ICON\n      });\n    }\n  })\n```\n\n## API\n\n### Transformers and formatters\n\nWebpack's errors processing, is done in four phases:\n\n1. Extract relevant info from webpack errors. This is done by the plugin [here](https://github.com/sodatea/friendly-errors-webpack-plugin/blob/master/src/core/extractWebpackError.js)\n2. Apply transformers to all errors to identify and annotate well know errors and give them a priority\n3. Get only top priority error or top priority warnings if no errors are thrown\n4. Apply formatters to all annotated errors\n\nYou can add transformers and formatters. Please see [transformErrors](https://github.com/sodatea/friendly-errors-webpack-plugin/blob/master/src/core/transformErrors.js),\nand [formatErrors](https://github.com/sodatea/friendly-errors-webpack-plugin/blob/master/src/core/formatErrors.js)\nin the source code and take a look a the [default transformers](https://github.com/sodatea/friendly-errors-webpack-plugin/tree/master/src/transformers)\nand the [default formatters](https://github.com/sodatea/friendly-errors-webpack-plugin/tree/master/src/formatters).\n\n## TODO\n\n- [x] Make it compatible with node 4\n\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/sodatea/friendly-errors-webpack-plugin.git"
  },
  "bugs": {
    "url": "https://github.com/sodatea/friendly-errors-webpack-plugin/issues"
  },
  "license": "MIT",
  "versions": {
    "1.7.1": {
      "name": "@soda/friendly-errors-webpack-plugin",
      "version": "1.7.1",
      "description": "Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience",
      "main": "index.js",
      "scripts": {
        "test": "eslint --ignore-pattern test/* && jest"
      },
      "keywords": [
        "friendly",
        "errors",
        "webpack",
        "plugin"
      ],
      "author": {
        "name": "Geoffroy Warin"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sodatea/friendly-errors-webpack-plugin.git"
      },
      "bugs": {
        "url": "https://github.com/sodatea/friendly-errors-webpack-plugin/issues"
      },
      "license": "MIT",
      "peerDependencies": {
        "webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
      },
      "devDependencies": {
        "babel-core": "^6.23.1",
        "babel-eslint": "^7.1.1",
        "babel-loader": "^6.3.0",
        "babel-plugin-transform-async-to-generator": "^6.22.0",
        "babel-preset-react": "^6.23.0",
        "eslint": "^3.16.1",
        "eslint-loader": "^1.6.1",
        "expect": "^1.20.2",
        "jest": "^18.1.0",
        "memory-fs": "^0.4.1",
        "webpack": "^2.2.1"
      },
      "dependencies": {
        "chalk": "^1.1.3",
        "error-stack-parser": "^2.0.0",
        "string-width": "^2.0.0"
      },
      "gitHead": "da05e1ca5759d3d45a06c5ba494b5052e2156c4f",
      "homepage": "https://github.com/sodatea/friendly-errors-webpack-plugin#readme",
      "_id": "@soda/friendly-errors-webpack-plugin@1.7.1",
      "_nodeVersion": "10.15.0",
      "_npmVersion": "6.7.0",
      "dist": {
        "integrity": "sha512-cWKrGaFX+rfbMrAxVv56DzhPNqOJPZuNIS2HGMELtgGzb+vsMzyig9mml5gZ/hr2BGtSLV+dP2LUEuAL8aG2mQ==",
        "shasum": "706f64bcb4a8b9642b48ae3ace444c70334d615d",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.1.tgz",
        "fileCount": 17,
        "unpackedSize": 26058,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUCDaCRA9TVsSAnZWagAAdAMP/j8F+cxEVItZJHOvhuaH\n2Y0E7Aori4E5ZKeffrhzyFwd2xaEs5WbQs/qvvj5okZh52g6TK46d3HV4EsF\nqaoTWmud7AVksweSxD7D56Up//6PgGuSTKAOJjIeX5h+WPeM+alrvwI7qGoh\nScCwn8tvdcBImXgFLZkX3aFRtsotbxQ4dLbvkB+lzgYT2J476A6cNDvLuppM\nHle7gaRtFecLfGSITUT1Vw+EhUX6nxl5ltP/yWGhdVaPBv7Zmo0zYhwFML9k\n2t/2y8lRIBiuYoG8UmcTJmttu74Um4ezzjUz8CDxkCo4ciV1k+Et25adAU0g\nZoRoNvWf1D2melq2z7tpUGxoAELGcfsrht1KW0Otz789iu0fxaBKTDlpgL88\nmcXoA+szlhOGPNGZL6TfcF4WbTF7QXMMGTDLi4I8zCl9qvQ5raMd8jI9Ie1c\noGiaxmH0w3eIwT2wrmODOEzv1le5a0lCV27My7ZXSxgpcv+a06n2pYfjFuzr\nUGROkcYAFMMZRytDTSXZxGn6AJwbq1uEm+36s+1uVWgTtaC/Wn5rSH6dQx/Q\n1Z/+/N5lmVwM2urcJSEWOVKlMfhljgK6rDXwAJtGFTS1m/lmA3U1LQ0fI5Jj\nTJqQanPgZI9FHVjgR/3uqTw5P19V9Fxk85ovNMpASSPXyVr5uCE8QKc51SO+\n1Bx2\r\n=jURz\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIGoTTovcj+Li7ZLnr7EOuhBhKUkc2J6Ip0pOfEi/BpajAiAlvgaLQRw9G74LtRuqSPjhKxLWPXTAXuZw7HhFE05QaQ=="
          }
        ]
      },
      "maintainers": [
        {
          "name": "soda",
          "email": "haoqunjiang+npm@gmail.com"
        }
      ],
      "_npmUser": {
        "name": "soda",
        "email": "haoqunjiang+npm@gmail.com"
      },
      "directories": {},
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/friendly-errors-webpack-plugin_1.7.1_1548755162185_0.22009127378561022"
      },
      "_hasShrinkwrap": false
    },
    "1.8.0": {
      "name": "@soda/friendly-errors-webpack-plugin",
      "version": "1.8.0",
      "description": "Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience",
      "main": "index.js",
      "engines": {
        "node": ">=8.0.0"
      },
      "scripts": {
        "test": "eslint --ignore-pattern \"test/**\" . && jest --testEnvironment node"
      },
      "keywords": [
        "friendly",
        "errors",
        "webpack",
        "plugin"
      ],
      "author": {
        "name": "Geoffroy Warin"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sodatea/friendly-errors-webpack-plugin.git"
      },
      "bugs": {
        "url": "https://github.com/sodatea/friendly-errors-webpack-plugin/issues"
      },
      "license": "MIT",
      "jest": {
        "testEnvironment": "node",
        "transformIgnorePatterns": [
          "node_modules",
          "src",
          "index.js"
        ]
      },
      "peerDependencies": {
        "webpack": "^4.0.0 || ^5.0.0"
      },
      "devDependencies": {
        "@babel/core": "^7.5.4",
        "@babel/plugin-transform-async-to-generator": "^7.5.0",
        "autoprefixer": "^9.6.0",
        "babel-core": "6.26.3",
        "babel-eslint": "^10.0.1",
        "babel-preset-react": "^6.23.0",
        "babel-loader-7": "npm:babel-loader@7.1.5",
        "babel-loader": "^8.0.6",
        "css-loader": "^2.1.1",
        "eslint": "^5.16.0",
        "eslint-7": "npm:eslint@^7.14.0",
        "eslint-loader": "^2.1.2",
        "eslint-plugin-node": "^9.0.1",
        "eslint-webpack-plugin": "^2.4.0",
        "expect": "^24.8.0",
        "jest": "^24.8.0",
        "memory-fs": "^0.4.1",
        "mini-css-extract-plugin": "^0.6.0",
        "node-sass": "^4.12.0",
        "postcss-loader": "^3.0.0",
        "sass": "^1.20.1",
        "sass-loader": "^7.1.0",
        "style-loader": "^0.23.1",
        "webpack": "^4.31.0"
      },
      "dependencies": {
        "chalk": "^2.4.2",
        "error-stack-parser": "^2.0.2",
        "string-width": "^2.0.0",
        "strip-ansi": "^5"
      },
      "gitHead": "448000b004e6e0b0da07421d52685f1cc75329c3",
      "homepage": "https://github.com/sodatea/friendly-errors-webpack-plugin#readme",
      "_id": "@soda/friendly-errors-webpack-plugin@1.8.0",
      "_nodeVersion": "12.19.0",
      "_npmVersion": "6.14.8",
      "dist": {
        "integrity": "sha512-RLotfx6k1+nfLacwNCenj7VnTMPxVwYKoGOcffMFoJDKM8tXzBiCN0hMHFJNnoAojduYAsxuiMm0EOMixgiRow==",
        "shasum": "84751d82a93019d5c92c0cf0e45ac59087cd2240",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.0.tgz",
        "fileCount": 17,
        "unpackedSize": 27507,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0jbRCRA9TVsSAnZWagAAPTQP/0vPTth9XXNF/Mtpn2XK\n2WOauzdM/BNPPagUgDhA2lyyxHx6jnrJRs1D/ER0SZX6+vR/C222Kb7biwk1\nYCm9cFFI4g9IBhj+KAkKbuov78j9Bn/WiLw0rPp/GioDdxFH3kM9jaELPUlX\npZNTCzMER7bcc4LkTXSxuBfV8InC5kluwocjzTzhJgFeypoS/bsXEVrLc/zb\n1vypnk8NNmDLWdYVXvDvNIO1nVV4RAxX3SGv4bv92hjjo1Md6LkUxB4udvAB\nlxX1sK+Wqw6i99WZCBBkLH//yEZ3Tn0bQzqu3fxhXVUVANyu2vSwup4u+aJz\nyTmSfM784LVHga4UvftmBa9aX0GzIxmEOVPdLveujXqo5N/Bl/lgzmOFMgAp\nu2J3V+/4QvfxKG2HiVcGBBF0y1pry2OaU3gA/fyaFt/wEHPN3qhBltjRqQF5\nhC8+Sob43Uq9sYA20oBb2Wrpbq2px4sXStPVl7TcWp31BSSck1cZxDJ6lBxb\nLMJgfId1nW9X552olX/9zdTfnsL7cafZHkulckglSgV23/U2ab+kJv3MIR7s\nKvtJCcD04ARztZzfU6ZTSWeIudacYT8aGBRXvYRYQcUfTiHSlkmGOv9fXjv2\nGBpLYLDSHyvMVrIdjQqDaRJW0F+VjZxePK7PUjoOWh/oCNbljRMzNeIjSnYz\nyXrR\r\n=Y/EU\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQDssWQrojx0FfbrwzE25AeqzmN4ipyOs8Er5oF9p1EybwIgcq+7RXHXYMju3IHdK5Y1CXQVbzP1BHpr1KEj5YIl2bs="
          }
        ]
      },
      "_npmUser": {
        "name": "soda",
        "email": "haoqunjiang+npm@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "soda",
          "email": "haoqunjiang+npm@gmail.com"
        },
        {
          "name": "fangbinwei",
          "email": "fangbinwei@yeah.net"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/friendly-errors-webpack-plugin_1.8.0_1607612112702_0.49737671872466516"
      },
      "_hasShrinkwrap": false
    },
    "1.8.1": {
      "name": "@soda/friendly-errors-webpack-plugin",
      "version": "1.8.1",
      "description": "Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience",
      "main": "index.js",
      "engines": {
        "node": ">=8.0.0"
      },
      "scripts": {
        "test": "eslint --ignore-pattern \"test/**\" . && jest --testEnvironment node"
      },
      "keywords": [
        "friendly",
        "errors",
        "webpack",
        "plugin"
      ],
      "author": {
        "name": "Geoffroy Warin"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/sodatea/friendly-errors-webpack-plugin.git"
      },
      "bugs": {
        "url": "https://github.com/sodatea/friendly-errors-webpack-plugin/issues"
      },
      "license": "MIT",
      "jest": {
        "testEnvironment": "node",
        "transformIgnorePatterns": [
          "node_modules",
          "src",
          "index.js"
        ]
      },
      "peerDependencies": {
        "webpack": "^4.0.0 || ^5.0.0"
      },
      "devDependencies": {
        "@babel/core": "^7.5.4",
        "@babel/plugin-transform-async-to-generator": "^7.5.0",
        "autoprefixer": "^9.6.0",
        "babel-core": "6.26.3",
        "babel-eslint": "^10.0.1",
        "babel-preset-react": "^6.23.0",
        "babel-loader-7": "npm:babel-loader@7.1.5",
        "babel-loader": "^8.0.6",
        "css-loader": "^2.1.1",
        "eslint": "^5.16.0",
        "eslint-7": "npm:eslint@^7.14.0",
        "eslint-loader": "^2.1.2",
        "eslint-plugin-node": "^9.0.1",
        "eslint-webpack-plugin": "^2.4.0",
        "expect": "^24.8.0",
        "jest": "^24.8.0",
        "memory-fs": "^0.4.1",
        "mini-css-extract-plugin": "^0.6.0",
        "node-sass": "^4.12.0",
        "postcss-loader": "^3.0.0",
        "sass": "^1.20.1",
        "sass-loader": "^7.1.0",
        "style-loader": "^0.23.1",
        "webpack": "^4.31.0"
      },
      "dependencies": {
        "chalk": "^3.0.0",
        "error-stack-parser": "^2.0.6",
        "string-width": "^4.2.3",
        "strip-ansi": "^6.0.1"
      },
      "gitHead": "598bedf3baca837fb4b8cead39ba4f8c6659e3ae",
      "homepage": "https://github.com/sodatea/friendly-errors-webpack-plugin#readme",
      "_id": "@soda/friendly-errors-webpack-plugin@1.8.1",
      "_nodeVersion": "12.22.7",
      "_npmVersion": "6.14.15",
      "dist": {
        "integrity": "sha512-h2ooWqP8XuFqTXT+NyAFbrArzfQA7R6HTezADrvD9Re8fxMLTPPniLdqVTdDaO0eIoLaAwKT+d6w+5GeTk7Vbg==",
        "shasum": "4d4fbb1108993aaa362116247c3d18188a2c6c85",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/@soda/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.8.1.tgz",
        "fileCount": 17,
        "unpackedSize": 27511,
        "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2bnACRA9TVsSAnZWagAA8lgP/05eZxp//oSZtLWkVylZ\n8aBxOTdP5kcY064I3HqE2suEhnnrCAymceYDI10JfJa0Xp7zl63uqbDq8Lhu\n2erPs/3HjKZ53QIMqpissaxwgdrT57PJmCBLHCoJm6Vi2V9KOmt623UxYIJR\ngqj0y7ZBJBptJl7OQZJY3aTObUMk2HfSubTbRABoy4d5XLdNLlsPawsut7z9\nopOvhBUJcPh2Y6z86oog7Sbz6DYw3/4HRZGBKypavUUh/QkrkaGlzf8FM8Fi\nLKcDYvOQCud1Jaox5eSyAl91gyJSMCFh5YEvpayeb2776TODP6+uFVszUdQq\nlKU1Y1G/6JFFX+XYt+SvHnTGRCfXk+FtTd0pS+2hB1z7XC09p0ofGsUl2wBA\n8AskPZR1m+akqH0V5M9c7cNKVbnzqcMwBMBqtU3dcHOSTKjBIS1yiNyylJAD\nIt9hpVER7oibKgZ4n80SCDuJ7/K4ty3EZ1Rkz1x0W3Gj6I5sD9Nv51GsOWuM\nrGMGV7gypzsvOGADT2mlnyywOksS4skwun+VwaiaVdbSI/svcu9dKGaVpygn\nMW/aJgsSP77ovsB2gXmajUElg+Vre5qZQBNDdyzLKRnHAL1iM4F7pNfea0m1\niC8iCegaF/wyznE7/yGiHfffGW0z7BD4pII1NTUOnoT776MLxsaw+7y6+ZzV\nYdnp\r\n=OyI1\r\n-----END PGP SIGNATURE-----\r\n",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCrLzMnZLyXWMURNDbdUAVU5xE1HN+xdRCeiJrSE9iIswIgYkVOa1Bd7MBPQU2LOPUiU9c2g4aynWDfngwpadgEKgo="
          }
        ]
      },
      "_npmUser": {
        "name": "soda",
        "email": "haoqunjiang+npm@gmail.com"
      },
      "directories": {},
      "maintainers": [
        {
          "name": "soda",
          "email": "haoqunjiang+npm@gmail.com"
        },
        {
          "name": "fangbinwei",
          "email": "fangbinwei@yeah.net"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/friendly-errors-webpack-plugin_1.8.1_1636965485810_0.06079418863895292"
      },
      "_hasShrinkwrap": false
    }
  },
  "name": "@soda/friendly-errors-webpack-plugin",
  "time": {
    "created": "2019-01-29T09:46:01.992Z",
    "1.7.1": "2019-01-29T09:46:02.353Z",
    "modified": "2026-05-10T17:17:21.104Z",
    "1.8.0": "2020-12-10T14:55:12.842Z",
    "1.8.1": "2021-11-15T08:38:05.955Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/sodatea/friendly-errors-webpack-plugin#readme"
}