1.0.1 • Published 6 years ago

webpack-node-server-plugin v1.0.1

Weekly downloads
279
License
MIT
Repository
github
Last release
6 years ago

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.

1.0.1

6 years ago

1.0.0

6 years ago

0.2.1

7 years ago

0.2.0

8 years ago

0.1.0

8 years ago