# webpack-notifier

> webpack + node-notifier = build status system notifications

Latest version **1.17.0** (published 2026-09-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install webpack-notifier
pnpm add webpack-notifier
yarn add webpack-notifier
bun add webpack-notifier
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.17.0 |
| Published | 2026-09-06 |
| First published | 2015-02-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 23.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 302 |
| Author | Tobias Bieniek |
| Maintainers | turbo87, gvozd |
| Keywords | webpack, notify, notification, node-notifier, notifier, build |

## Links

- npm: https://www.npmjs.com/package/webpack-notifier
- Repository: https://github.com/Turbo87/webpack-notifier
- Homepage: https://github.com/Turbo87/webpack-notifier#readme
- Issues: https://github.com/Turbo87/webpack-notifier/issues
- npm.io page: https://npm.io/package/webpack-notifier

## Dependencies (3)

- [strip-ansi](https://npm.io/package/strip-ansi.md) ^6.0.0
- [node-notifier](https://npm.io/package/node-notifier.md) ^9.0.0
- [@types/node-notifier](https://npm.io/package/@types/node-notifier.md) ^8.0.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.17.0 (latest) — 2026-09-06
- 1.16.0 — 2026-09-05
- 1.15.0 — 2021-12-19
- 1.14.1 — 2021-10-13
- 1.14.0 — 2021-10-03
- 1.13.0 — 2021-02-02
- 1.12.0 — 2020-12-07
- 1.11.1 — 2020-12-06
- 1.11.0 — 2020-11-29
- 1.10.1 — 2020-11-15
- 1.10.0 — 2020-11-15
- 1.9.1 — 2020-11-15
- 1.9.0 — 2020-11-15
- 1.8.0 — 2019-06-27
- 1.7.0 — 2018-10-10
- … 14 more at https://npm.io/package/webpack-notifier/versions

## README

# webpack-notifier

[![npm Version](https://img.shields.io/npm/v/webpack-notifier.svg)](https://www.npmjs.com/package/webpack-notifier)
[![GitHub Workflow Status](https://github.com/Turbo87/webpack-notifier/workflows/CI/badge.svg)](https://github.com/Turbo87/webpack-notifier/actions?query=workflow:CI)
[![Coverage Status](https://coveralls.io/repos/github/Turbo87/webpack-notifier/badge.svg)](https://coveralls.io/github/Turbo87/webpack-notifier?branch=master)
[![Code Style](https://badgen.net/badge/code%20style/Airbnb/007ec6?icon=airbnb)](https://github.com/airbnb/javascript)  
[![npm](https://img.shields.io/npm/dm/webpack-notifier)](https://www.npmjs.com/package/webpack-notifier)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/webpack-notifier)

This is a [webpack](http://webpack.github.io/) plugin that uses the
[node-notifier](https://github.com/mikaelbr/node-notifier) package to
display build status system notifications to the user.

![webpack-notifier screenshot](screenshot.png)

> This is a fork of the
[webpack-error-notification](https://github.com/vsolovyov/webpack-error-notification)
plugin. It adds support for Windows and there is no need to manually install
the `terminal-notifier` package on OS X anymore.

The plugin will notify you about the first run (success/fail),
all failed runs and the first successful run after recovering from
a build failure. In other words: it will stay silent if everything
is fine with your build.


## Installation

Use `npm` to install this package:

    npm install --save-dev webpack-notifier

Check the `node-notifier`
[Requirements](https://github.com/mikaelbr/node-notifier#requirements)
whether you need to install any additional tools for your OS.


## Usage

In the `webpack.config.js` file:

```js
var WebpackNotifierPlugin = require('webpack-notifier');

var config = module.exports = {
  // ...

  plugins: [
    new WebpackNotifierPlugin(),
  ]
}
```


## Configuration

### All `node-notifier` options

> **Deprecated since v1.17.** This way of passing options keeps working until
> v2.0 — use [`notifyOptions`](#notifyoptions) instead.

You can use any [node-notifier](https://www.npmjs.com/package/node-notifier) options (depending on your OS)
Except for options generated by the plugin itself:
* `title` - it can be not only a string, but also a function
* `message` - generated based on the value of other options
* `contentImage` - it can be an object with images for different statuses
* `icon` - matches with `contentImage`

### notifyOptions

> Since v1.17.

The recommended way to pass [node-notifier](https://www.npmjs.com/package/node-notifier) options (depending on your OS) on every notification:

```js
new WebpackNotifierPlugin({
  notifyOptions: {
    appID: 'com.squirrel.your.app', // Windows: use your app id instead of the default 'SnoreToast' one
  },
});
```

`notifyOptions` accepts any node-notifier option. The values for `title`,
`message`, `contentImage` and `icon` are always generated by the plugin, so
anything you set for them here is ignored — use the plugin-level
[`title`](#title) and [`contentImage`](#content-image) options instead.

### notifier / notifierOptions

> Since v1.17.

By default the plugin notifies through the `node-notifier` notifier selected for your OS.
Use `notifier` to pick another notifier and `notifierOptions` to configure its
constructor. `notifierOptions` without `notifier` configure the constructor of
the notifier selected for your OS:

```js
var nodeNotifier = require('node-notifier');

new WebpackNotifierPlugin({
  notifier: nodeNotifier.WindowsToaster, // or just 'WindowsToaster'
  notifierOptions: {
    withFallback: false, // do not fall back to balloon notifications
  },
});
```

`notifier` accepts the name of one of the notifiers exported by
[node-notifier](https://www.npmjs.com/package/node-notifier)
(`NotificationCenter`, `WindowsToaster`, `WindowsBalloon`, `Growl`, `NotifySend`)
or the constructor itself. `notifierOptions` are passed to the notifier
constructor — see the `node-notifier` documentation for the options supported
by each notifier (e.g. `withFallback`, `customPath`).

### Title

Title shown in the notification.

```js
new WebpackNotifierPlugin({title: 'Webpack'});
```

```js
new WebpackNotifierPlugin({title: function (params) {
  return `Build status is ${params.status} with message ${params.message}`;
}});
```

### Emojis in message text

Show status emoji icon before the message.

```js
new WebpackNotifierPlugin({emoji: true});
```

### Content Image

Image shown in the notification. Can be a path string or object with paths.

#### String path:
```js
var path = require('path');

new WebpackNotifierPlugin({contentImage: path.join(__dirname, 'logo.png')});
```

#### Object string path:
```js
var path = require('path');

const statusesPaths = {
  success: path.join(__dirname, 'success.png'),
  warning: path.join(__dirname, 'warning.png'),
  error: path.join(__dirname, 'error.png')
}

new WebpackNotifierPlugin({contentImage: statusesPaths});
```

### Exclude Warnings

If set to `true`, warnings will not cause a notification.

```js
new WebpackNotifierPlugin({excludeWarnings: true});
```

### Always Notify

Trigger a notification every time. Call it "noisy-mode".

```js
new WebpackNotifierPlugin({alwaysNotify: true});
```

### Notify on error

Trigger a notification only on error.

```js
new WebpackNotifierPlugin({onlyOnError: true});
```

### Skip Notification on the First Build

Do not notify on the first build.  This allows you to receive notifications on subsequent incremental builds without being notified on the initial build.

```js
new WebpackNotifierPlugin({skipFirstNotification: true});
```

---
_Source: https://npm.io/package/webpack-notifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
