async close() {
        // close chokidar watchers
        if (this.watchers && this.watchers.length) {
            this.watchers.forEach(watcher => {
                watcher.close();
            });
            this.watchers = [];
        }
        // close devMiddleware
        if (this.devMiddleware) {
            await new Promise(resolve => {
                this.devMiddleware.close(() => resolve());
            });
        }
        // stop serverCompiler watching in ssr mode
        if (this.serverWatching) {
            await new Promise(resolve => {
                this.serverWatching.close(() => resolve());
            });
            this.serverWatching = null;
        }
    }
close watchers and some middlewares before rebuild