Skip to content

Commit

Permalink
Disable middleware in production
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbayerlein committed Jun 23, 2016
1 parent fa98053 commit 597bad8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const WebpackHotMiddleware = require('webpack-hot-middleware');
const pkg = require('../package.json');

exports.register = function register(server, options, next) {
if (process.env.NODE_ENV === 'production') {
return next();
}

const webpackConfig = options.webpack || {};
const webpackDevConfig = options.webpackDev || {};
const webpackHotConfig = options.webpackHot || {};
Expand Down

0 comments on commit 597bad8

Please sign in to comment.