remove webpack-dev-middleware

This commit is contained in:
Rich Harris
2017-12-18 11:41:02 -05:00
parent 514331b5e3
commit 8270463281
4 changed files with 62 additions and 129 deletions

View File

@@ -111,8 +111,16 @@ module.exports = function create_compiler(client, server, dest, routes, dev) {
server.plugin('failed', reject);
// client is already being watched by the middleware,
// so we only need to start the server compiler
client.watch({}, (err, stats) => {
if (stats.hasErrors()) {
reject(stats.toJson().errors[0]);
} else {
client_updated(stats);
client_is_ready = true;
if (server_is_ready) fulfil();
}
});
server.watch({}, (err, stats) => {
if (stats.hasErrors()) {
reject(stats.toJson().errors[0]);