# jaybe78-nodemon-webpack-plugin

> A webpack plugin that starts and reloads a server using Nodemon.

Latest version **0.0.2** (published 2018-11-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install jaybe78-nodemon-webpack-plugin
pnpm add jaybe78-nodemon-webpack-plugin
yarn add jaybe78-nodemon-webpack-plugin
bun add jaybe78-nodemon-webpack-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-11-23 |
| First published | 2018-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.11.5 |
| Dependencies | 2 |
| Unpacked size | 247.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 179 |
| Author | Roey Izhaki |
| Maintainers | jaybe |
| Keywords | webpack, nodemon, plugin, server, start, watch, restart |

## Links

- npm: https://www.npmjs.com/package/jaybe78-nodemon-webpack-plugin
- Repository: https://github.com/Izhaki/nodemon-webpack-plugin
- Homepage: https://github.com/Izhaki/nodemon-webpack-plugin.git
- Issues: https://github.com/Izhaki/nodemon-webpack-plugin.git/issues
- npm.io page: https://npm.io/package/jaybe78-nodemon-webpack-plugin

## Dependencies (2)

- [ramda](https://npm.io/package/ramda.md) 0.24.1
- [nodemon](https://npm.io/package/nodemon.md) 1.11.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2018-11-23
- 0.0.1 — 2018-11-23

## README

# Nodemon Webpack Plugin

[![Build Status](https://travis-ci.org/Izhaki/nodemon-webpack-plugin.svg?branch=master)](https://travis-ci.org/Izhaki/nodemon-webpack-plugin)
[![NPM Version](https://badge.fury.io/js/nodemon-webpack-plugin.svg?style=flat)](https://npmjs.org/package/nodemon-webpack-plugin)
[![Node version](https://img.shields.io/node/v/nodemon-webpack-plugin.svg?style=flat)](http://nodejs.org/download/)

Uses [Nodemon](https://nodemon.io/) to watch and restart your module's output file, but only when webpack is in watch mode (ie, `--watch`).

Saves the need for installing, configuring and running Nodemon as a seperate process.

## Installation

```bash
# Webpack 4:
npm install nodemon-webpack-plugin@next --save-dev

# Webpack 3 or 2:
npm install nodemon-webpack-plugin --save-dev
```

## Usage

```javascript
const NodemonPlugin = require( 'nodemon-webpack-plugin' ) // Ding

module.exports = {
    entry: './src/server.js',
    output: {
        path: path.resolve('./dist'),
        filename: 'server.js',
    },
    plugins: [
        new NodemonPlugin(), // Dong
    ],
}
```

Then:

```shell
$ webpack --watch
```

## Modes

### Zero-config mode

```javascript
new NodemonPlugin()
```

Only watches the output file.

### With config

Allows a [Nodemon config object](https://github.com/remy/nodemon#config-files) to override and extend the default config:

```javascript
{
    script: outputFile,
    watch:  outputFile,
}
```

For example:

```javascript
new NodemonPlugin({
    /// Arguments to pass to the script being watched.
    args: ['demo'],

    // What to watch.
    watch: path.resolve('./dist'),

    // Files to ignore.
    ignore: ['*.js.map'],

    // Detailed log.
    verbose: true,

    // Node arguments.
    nodeArgs: [ '--debug=9222' ]

    // If using more than one entry, you can specify
    // which output file will be restarted.
    script: './dist/server.js'

    // Extensions to watch
    ext: 'js,njk,json'
})
```

## Example output

```shell
Hash: 366cbbbab13237b29593
Version: webpack 3.4.1
Time: 50ms
    Asset     Size  Chunks             Chunk Names
server.js  3.17 kB       0  [emitted]  main
   [0] ./test/server.js 388 bytes {0} [built]
    + 3 hidden modules
[nodemon] restarting due to changes...
[nodemon] starting `node test/dist/server.js`
```

---
_Source: https://npm.io/package/jaybe78-nodemon-webpack-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
