refactor(vite): show log when client build is starting (#9759)

This commit is contained in:
Anthony Fu 2022-12-16 12:47:12 +01:00 committed by GitHub
parent ef4b667ba0
commit 30c4a599d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,9 +149,10 @@ export async function buildClient (ctx: ViteBuildContext) {
})
} else {
// Build
logger.info('Building client...')
const start = Date.now()
await vite.build(clientConfig)
await ctx.nuxt.callHook('vite:compiled')
logger.info(`Client built in ${Date.now() - start}ms`)
logger.success(`Client built in ${Date.now() - start}ms`)
}
}