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:
Or through require
:
const NodeServerPlugin = NodeServerPlugin;
And add it to your webpack config:
moduleexports = target: 'node' entry: './server.js' output: path: '.tmp/dev' filename: '[name].bundle.js' resolve: extensions: '.js' plugins:
Per default the first entry
with the extension .js
is used when starting the server.
Config
Look at NodeServerPluginConfig
for config options.