{"id":15663866,"url":"https://github.com/taehwanno/warnings-to-errors-webpack-plugin","last_synced_at":"2025-04-15T01:15:16.257Z","repository":{"id":29610666,"uuid":"122224281","full_name":"taehwanno/warnings-to-errors-webpack-plugin","owner":"taehwanno","description":"a webpack plugin that can recognize every warning as errors.","archived":false,"fork":false,"pushed_at":"2023-03-04T03:59:42.000Z","size":651,"stargazers_count":18,"open_issues_count":13,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T01:14:55.935Z","etag":null,"topics":["webpack","webpack-plugin"],"latest_commit_sha":null,"homepage":"https://npm.im/warnings-to-errors-webpack-plugin","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taehwanno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-20T16:30:27.000Z","updated_at":"2024-10-25T02:55:29.000Z","dependencies_parsed_at":"2024-06-18T16:42:54.505Z","dependency_job_id":"32a29980-29ed-4350-8d03-5f60ba9abe46","html_url":"https://github.com/taehwanno/warnings-to-errors-webpack-plugin","commit_stats":{"total_commits":61,"total_committers":4,"mean_commits":15.25,"dds":0.4098360655737705,"last_synced_commit":"4eddf5d4a28ff5702c17a59eecec83f13ace37f1"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taehwanno%2Fwarnings-to-errors-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taehwanno%2Fwarnings-to-errors-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taehwanno%2Fwarnings-to-errors-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taehwanno%2Fwarnings-to-errors-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taehwanno","download_url":"https://codeload.github.com/taehwanno/warnings-to-errors-webpack-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986315,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["webpack","webpack-plugin"],"created_at":"2024-10-03T13:40:14.266Z","updated_at":"2025-04-15T01:15:16.210Z","avatar_url":"https://github.com/taehwanno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Warnings To Errors Webpack Plugin [![Build Status](https://circleci.com/gh/taehwanno/warnings-to-errors-webpack-plugin/tree/master.svg?style=shield\u0026circle-token=bb46a55947094ef2eae0ac99f6d7ccff524e73a9)](https://circleci.com/gh/taehwanno/warnings-to-errors-webpack-plugin/tree/master)\n\n**Table of contents**\n\n- [Motivation](#motivation)\n- [Installation](#installation)\n- [Usage](#usage)\n- [License](#license)\n\n## Motivation\n\nEven if the build result with webpack has some warnings, the build can succeed with no error exit codes. This can be trouble if some developer not carefully sees the result of CI service. By changing all warnings to errors, webpack can recognize every warning as an error.\n\n## Installation\n\n```bash\n$ npm i -D warnings-to-errors-webpack-plugin\n# or\n$ yarn add -D warnings-to-errors-webpack-plugin\n```\n\n\n## Usage\n\n- **default**\n\n```js\nconst WarningsToErrorsPlugin = require('warnings-to-errors-webpack-plugin');\n\nmodule.exports = {\n  // ...\n  plugins: [\n    new WarningsToErrorsPlugin(),\n  ],\n};\n```\n\n- **with [`warningsFilter`](https://webpack.js.org/configuration/stats/#statswarningsfilter) and [`ignoreWarnings`](https://webpack.js.org/configuration/other-options/#ignorewarnings)**\n\nThis plugin ignores warnings that are matched by `warningsFilter` or `ignoreWarnings` without recognizing them as errors.\n\n```js\n// webpack v5\n{\n  plugins: [\n    new WarningsToErrorsPlugin(),\n  ],\n  ignoreWarnings: [\n    {\n      message: /compilation warning/,\n    },\n  ],\n}\n```\n\nIf you use `ignoreWarnings` and `warningsFilter` options at the same time in webpack v5, the plugin will ignore all matched warnings in both. but recommend using `ignoreWarnings` only.\n\n```js\n// webpack v5\n{\n  plugins: [\n    new WarningsToErrorsPlugin(),\n  ],\n  ignoreWarnings: [\n    {\n      message: /compilation warning 1/,\n    },\n  ],\n  stats: {\n    warningsFilter: [\n      /compilation warning 2/,\n    ],\n  },\n}\n```\n\n```js\n// webpack v2, v3 and v4\n{\n  plugins: [\n    new WarningsToErrorsPlugin(),\n  ],\n  stats: {\n    warningsFilter: [\n      /compilation warning/,\n    ],\n  },\n}\n```\n\n- **with [`NoEmitOnErrorsPlugin`](https://webpack.js.org/plugins/no-emit-on-errors-plugin/)**\n\nSkip the emitting phase whenever there are warnings while compiling. this ensures that no assets are emitted that include warnings.\n\n```js\n// webpack \u003e= v4\n{\n  optimization: {\n    noEmitOnErrors: true,\n  },\n  plugins: [\n    new WarningsToErrorsPlugin();\n  ],\n};\n```\n\n```js\n// webpack v2 and v3\n{\n  plugins: [\n    new WarningsToErrorsPlugin(),\n    new NoEmitOnErrorsPlugin(),\n  ],\n};\n```\n\n## License\n\nMIT © [Taehwan Noh](https://github.com/taehwanno)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaehwanno%2Fwarnings-to-errors-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaehwanno%2Fwarnings-to-errors-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaehwanno%2Fwarnings-to-errors-webpack-plugin/lists"}