https://github.com/kejunmao/unplugin-notifier
Send native notifications when an error occurs in a bundle build
https://github.com/kejunmao/unplugin-notifier
node-notifier notifications unplugin
Last synced: 23 days ago
JSON representation
Send native notifications when an error occurs in a bundle build
- Host: GitHub
- URL: https://github.com/kejunmao/unplugin-notifier
- Owner: KeJunMao
- License: mit
- Created: 2023-09-19T09:49:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-21T02:24:33.000Z (over 2 years ago)
- Last Synced: 2025-10-25T14:49:55.664Z (4 months ago)
- Topics: node-notifier, notifications, unplugin
- Language: TypeScript
- Homepage:
- Size: 855 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# unplugin-notifier
Send native notifications when an error occurs in a bundler build, Powered by [unplugin](https://github.com/KeJunMao/unplugin-compression) and [node-notifier](https://github.com/mikaelbr/node-notifier/).
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![License][license-src]][license-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
English | [简体中文](./README.zh-cn.md)
## Preview
Windows

MacOS

Linux

## Install
```bash
npm i unplugin-notifier
```
Check the `node-notifier` [requirements](https://github.com/mikaelbr/node-notifier#requirements) whether you need to install any additional tools for your OS.
Vite
```ts
// vite.config.ts
import Notifier from 'unplugin-notifier/vite'
export default defineConfig({
plugins: [
Notifier({ /* options */ }),
],
})
```
Example: [`playground/`](./playground/)
Rollup
```ts
// rollup.config.js
import Notifier from 'unplugin-notifier/rollup'
export default {
plugins: [
Notifier({ /* options */ }),
],
}
```
Webpack
```ts
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-notifier/webpack')({ /* options */ })
]
}
```
Nuxt
```ts
// nuxt.config.js
export default defineNuxtConfig({
modules: [
['unplugin-notifier/nuxt', { /* options */ }],
],
})
```
> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
Vue CLI
```ts
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-notifier/webpack')({ /* options */ }),
],
},
}
```
esbuild
```ts
// esbuild.config.js
import { build } from 'esbuild'
import Notifier from 'unplugin-notifier/esbuild'
build({
plugins: [Notifier()],
})
```
Rspack (⚠️ experimental)
```ts
// rspack.config.js
module.exports = {
plugins: [
require('unplugin-notifier/rspack')({ /* options */ }),
],
}
```
[npm-version-src]: https://img.shields.io/npm/v/unplugin-notifier?style=flat&colorA=18181B&colorB=F0DB4F
[npm-version-href]: https://npmjs.com/package/unplugin-notifier
[npm-downloads-src]: https://img.shields.io/npm/dm/unplugin-notifier?style=flat&colorA=18181B&colorB=F0DB4F
[npm-downloads-href]: https://npmjs.com/package/unplugin-notifier
[bundle-src]: https://img.shields.io/bundlephobia/minzip/unplugin-notifier?style=flat&colorA=18181B&colorB=F0DB4F
[bundle-href]: https://bundlephobia.com/result?p=unplugin-notifier
[license-src]: https://img.shields.io/github/license/kejunmao/unplugin-notifier.svg?style=flat&colorA=18181B&colorB=F0DB4F
[license-href]: https://github.com/kejunmao/unplugin-notifier/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsDocs.io-reference-18181B?style=flat&colorA=18181B&colorB=F0DB4F
[jsdocs-href]: https://www.jsdocs.io/package/unplugin-notifier