0.0.7 • Published 8 months ago

unplugin-notifier v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

unplugin-notifier

Send native notifications when an error occurs in a bundler build, Powered by unplugin and node-notifier.

npm version npm downloads bundle License JSDocs

English | 简体中文

Preview

Windows Preview

MacOS Preview

Linux Preview

Install

npm i unplugin-notifier

Check the node-notifier requirements whether you need to install any additional tools for your OS.

// vite.config.ts
import Notifier from 'unplugin-notifier/vite'

export default defineConfig({
  plugins: [
    Notifier({ /* options */ }),
  ],
})

Example: playground/

// rollup.config.js
import Notifier from 'unplugin-notifier/rollup'

export default {
  plugins: [
    Notifier({ /* options */ }),
  ],
}

// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-notifier/webpack')({ /* options */ })
  ]
}

// nuxt.config.js
export default defineNuxtConfig({
  modules: [
    ['unplugin-notifier/nuxt', { /* options */ }],
  ],
})

This module works for both Nuxt 2 and Nuxt Vite

// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-notifier/webpack')({ /* options */ }),
    ],
  },
}

// esbuild.config.js
import { build } from 'esbuild'
import Notifier from 'unplugin-notifier/esbuild'

build({
  plugins: [Notifier()],
})

// rspack.config.js
module.exports = {
  plugins: [
    require('unplugin-notifier/rspack')({ /* options */ }),
  ],
}