Skip to content
Webpack plugin that automatically (re)starts your server between builds.
JavaScript
Branch: args
Clone or download
Pull request Compare This branch is 1 commit ahead of ericclemmons:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.babelrc
.gitignore
.npmrc
.nvmrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
package.json

README.md

reload-server-webpack-plugin

Webpack plugin that automatically (re)starts your server between builds.

travis build Coverage Status version downloads MIT License


Why?

  • Remove your dependency on nodemon, forever, pm2, or similar.
  • This works better from a "cold start" when your server hasn't been built yet.
  • Fewer issues with websockets & hot-module reloading.

Installation

$ npm install --save-dev reload-server-webpack-plugin

Usage

Update your webpack.config.js:

module.exports = {
  ...
  plugins: [
    new ReloadServerPlugin({
      script: "path/to/server.js", // Defaults to process.cwd() + "/server.js"
      nodeArgs: ["--inspect"], // pass args to node, defaults to []
      args: ['--your-arg-here'] // pass args to script, defaults to []
    }),
  ],
  ...
};

license

MIT License 2015 © Eric Clemmons

You can’t perform that action at this time.