Skip to content

Commit

Permalink
Show build time
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Nov 4, 2024
1 parent 6e7d261 commit 6de773a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ const plugins = [
{
name: 'log',
setup (build) {
const startTime = Date.now();

build.onStart(() => {
console.log(new Date(), 'Build started');
});
build.onEnd(() => {
console.log(new Date(), 'Build finished');
console.log(new Date(), `Build finished (${Date.now() - startTime}ms)`);
});
}
}
Expand Down

0 comments on commit 6de773a

Please sign in to comment.