Search code examples
reactjswebpackzshiterm2oh-my-zsh

System notification for hot module replacement WebPack ZSH


I have a legacy project which takes a lot of time to build. We are using HMR in development mode. However, I always have to toggle between the screens to check if the build is complete. I am using Iterm2 with ZSH and have tried bgnotify plugin for background notifications for long-running commands, it is great but it does not work for HMR. I also tried webpack plugin webpack-build-notifier but it also does not work for HMR. Can someone suggest a way to get system notifications on every HMR build?


Solution

  • Try using webpack-notifier with config

    const WebpackNotifierPlugin = require('webpack-notifier');
    ........
    .......
    new WebpackNotifierPlugin({ 
       excludeWarnings: true, 
       alwaysNotify: true, 
       title: "App is build" 
    })