Skip to content

Commit

Permalink
fix(scripts/serve): missing build time
Browse files Browse the repository at this point in the history
  • Loading branch information
PalmDevs committed Jan 5, 2025
1 parent c18027a commit 31a4113
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/serve.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ const args = yargs(process.argv.slice(2))
export function serve() {
const server = createServer(async (_, res) => {
try {
const { config, context, timeTook } = await buildBundle()
const initialStartTime = performance.now()
const { config, context } = await buildBundle()

printBuildSuccess(context.hash, undefined, timeTook, false)
printBuildSuccess(context.hash, undefined, performance.now() - initialStartTime, false)

res.writeHead(200, { 'Content-Type': 'application/javascript' })
res.end(await readFile(config.outfile, 'utf-8'))
Expand Down

0 comments on commit 31a4113

Please sign in to comment.