How to use the webpack-dev-server.prototype function in webpack-dev-server

To help you get started, we’ve selected a few webpack-dev-server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github appsforartists / ambidex / src / Ambidex.server.js View on Github external
var Immutable         = require("immutable");
var Lazy              = require("lazy.js");
var mach              = require("mach");
var React             = require("react/addons");
var ReactRouter       = require("react-router");
var Webpack           = require("webpack");
var WebpackDevServer  = require("webpack-dev-server");

var {
  Reactor
} = require("experimental-nuclear-js");

var toCamelCase       = require("to-camel-case");

if (WebpackDevServer)
  WebpackDevServer.prototype.listen = Promise.promisify(WebpackDevServer.prototype.listen);

var createWebpackSettings           = require("./createWebpackSettings");
var createHandlerWithAmbidexContext = require("./createHandlerWithAmbidexContext");
var utilities                       = require("./addons/utilities");

function Ambidex (
  {
    settings,
    middlewareInjector
  }
) {
  var  rejectInitializationPromise;
  var resolveInitializationPromise;

  var initializationPromise = new Promise(
    (resolve, reject) => {