Skip to content

Instantly share code, notes, and snippets.

@icodeforlove
Created February 22, 2016 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icodeforlove/ae10b31d1a180577b815 to your computer and use it in GitHub Desktop.
Save icodeforlove/ae10b31d1a180577b815 to your computer and use it in GitHub Desktop.
webpack-dev-server-delay
// add a delay to webpack-dev-server
(function () {
var Server = require('webpack-dev-server/lib/Server'),
sendStats = Server.prototype._sendStats,
delay = 75;
Server.prototype._sendStats = function () {
var args = arguments,
self = this;
setTimeout(function () {
sendStats.apply(self, args);
}, delay);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment