mirror of
https://github.com/c8r/x0.git
synced 2024-09-11 13:45:52 +03:00
Resolve stats from dev
This commit is contained in:
parent
47844673d2
commit
7aff023094
4
cli.js
4
cli.js
@ -139,8 +139,8 @@ switch (cmd) {
|
||||
log.start('starting dev server')
|
||||
const { dev } = require('.')
|
||||
dev(opts)
|
||||
.then(res => {
|
||||
const { port } = res.options
|
||||
.then(({ server }) => {
|
||||
const { port } = server.options
|
||||
const url = `http://localhost:${port}`
|
||||
log.stop(
|
||||
'dev server listening on',
|
||||
|
@ -69,8 +69,8 @@ module.exports = async (opts) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
serve(serveOpts)
|
||||
.then(server => {
|
||||
server.compiler.hooks.done.tap({ name: 'x0' }, () => {
|
||||
resolve(server)
|
||||
server.compiler.hooks.done.tap({ name: 'x0' }, (stats) => {
|
||||
resolve({ server, stats })
|
||||
})
|
||||
})
|
||||
.catch(reject)
|
||||
|
Loading…
Reference in New Issue
Block a user