Skip to content

Commit 89db7cf

Browse files
committed
Better message
1 parent 701aca8 commit 89db7cf

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

packages/bundle/esbuild.static.mjs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/* eslint-env node */
44
/* eslint-disable no-console */
55
/* eslint-disable no-magic-numbers */
6+
/* eslint-disable no-restricted-globals */
67

78
import { build, context } from 'esbuild';
89
import { resolve as importMetaResolve } from 'import-meta-resolve';
@@ -190,8 +191,16 @@ async function buildNextConfig() {
190191
{
191192
name: 'watcher',
192193
setup(build) {
193-
build.onEnd(() => console.log(`/static has been built`));
194-
build.onStart(() => console.log('Building /static'));
194+
let buildStart = Date.now();
195+
196+
console.log(`Running in watch mode`);
197+
198+
build.onStart(() => {
199+
buildStart = Date.now();
200+
console.log(`Build start`);
201+
});
202+
203+
build.onEnd(() => console.log(`⚡ Build success in ${Date.now() - buildStart}ms`));
195204
}
196205
}
197206
]

0 commit comments

Comments
 (0)