webpack-notifier-2 is a webpack plugin designed to provide system desktop notifications about the status of webpack builds. As a fork of the original webpack-notifier and webpack-error-notification plugins, it specifically addresses cross-platform compatibility, offering out-of-the-box support for Windows and eliminating the need for manual terminal-notifier installations on OS X. The plugin, currently at stable version 2.5.0, focuses on delivering notifications for the first build (success/fail), all subsequent failed builds, and the first successful build after a failure, remaining silent when builds are consistently successful. Recent updates, including a 'timeout' option and default notification images, contribute to a more 'zero-config' experience. This indicates an active development cadence with ongoing minor feature additions and bug fixes. It fundamentally relies on the node-notifier package for its core notification capabilities.
npm install webpack-notifier-2Verified import paths — ran on the pinned version, not inferred.
Sets up webpack-notifier-2 in a basic webpack configuration to display system notifications for build status. This example shows basic configuration and usage.
Refer to the 'node-notifier' package's documentation for platform-specific installation requirements and ensure all necessary system tools are in place.
Update your `package.json` and all `require()`/`import` statements to use `webpack-notifier-2`.
Ensure your webpack config `plugins` array contains `new WebpackNotifierPlugin(...)`.
Change the import/require path to `webpack-notifier-2` (e.g., `require('webpack-notifier-2')`).Ensure you are using `new WebpackNotifierPlugin(...)` in your `plugins` array and that you are importing it as a default export (e.g., `const WebpackNotifierPlugin = require('webpack-notifier-2');`).Verify `node-notifier` requirements for your OS are met. Check `webpack-notifier-2` options: ensure `excludeWarnings` is not true if you want warning notifications, and `onlyOnError` is not true if you want success notifications. Consider `alwaysNotify: true` for testing.