webpack-node-server-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Webpack Node Server Plugin

Webpack plugin which restarts node script with every compilation.

Install

npm i -D webpack-node-server-plugin

Usage

Import the plugin trough import syntax:

import { NodeServerPlugin } from 'webpack-node-server-plugin'

Or through require:

const NodeServerPlugin = require('webpack-node-server-plugin').NodeServerPlugin;

And add it to your webpack config:

module.exports = {
    target: 'node',
    entry: './server.js',
    output: {
        path: '.tmp/dev',
        filename: '[name].bundle.js'
    },
    resolve: {
        extensions: ['.js']
    },
    plugins: [
        new NodeServerPlugin()
    ]
}

Per default the first entry with the extension .js is used when starting the server.

Config

Look at NodeServerPluginConfig for config options.

Dependencies (1)

Dev Dependencies (24)

Package Sidebar

Install

npm i webpack-node-server-plugin

Weekly Downloads

113

Version

1.0.1

License

MIT

Unpacked Size

22.1 kB

Total Files

17

Last publish

Collaborators

  • blaugold