Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let run = new Promise((resolve, reject) => {
try {
let devServerOptions = this.webpackConfig.devServer || {};
devServerOptions.host = host;
devServerOptions.port = port;
if (devServerOptions.quiet === undefined) {
devServerOptions.quiet = true;
}
if (devServerOptions.inline === undefined) {
devServerOptions.inline = true;
}
Server.addDevServerEntrypoints(this.webpackConfig, devServerOptions);
this.compiler = webpack(this.webpackConfig);
this.server = new Server(this.compiler, devServerOptions);
this.client = request(this.server.app);
this.server.listen(port, host, err => {
this.result = {
err,
stats: null
};
resolve(this);
});
}
catch (err) {
console.error(err);
this.result = {
err,