webpack-first-build-notifier
This is a webpack plugin that uses the node-notifier package to display notifications for webpack first build events.
To use, install the webpack-first-build-notifier package npm install webpack-first-build-notifier --save-dev
and add the plugin to your Webpack configuration file
// webpack.config.js
const WebpackFirstBuildNotifierPlugin = require('webpack-first-build-notifier');
module.exports = {
// ...
plugins: [
new WebpackFirstBuildNotifierPlugin({
title: "Webpack",
message: "The build is complete!";
sound: "Ping";
})
],
// ...
}
Config Options
title
type: string | undefined
- The notification title. Defaults to "webpack-first-build-plugin".
message
type: string | undefined
- The notification message. Defaults to "The build is complete!".
sound
type: "Boop" | "Breeze" | "Bubble" | "Crystal" | "Funky" | "Heroine" | "Jump" | "Mezzo" | "Pebble" | "Pluck" | "Ping" | "Sonar" | "Sonumi" | "Submerge" | undefined
- The notification sound. Defaults to "Ping".
TypeScript
// webpack.config.ts
import webpack from 'webpack'
import WebpackFirstBuildNotifierPlugin from 'webpack-first-build-notifier';
const config: webpack.Configuration = {
// ... snip ...
plugins: [
new WebpackFirstBuildNotifierPlugin({
title: "Webpack",
message: "The build is complete!";
sound: "Ping";
})
],
// ... snip ...
};
export default config;