File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33/* eslint-env node */
44/* eslint-disable no-console */
55/* eslint-disable no-magic-numbers */
6+ /* eslint-disable no-restricted-globals */
67
78import { build , context } from 'esbuild' ;
89import { 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 ]
You can’t perform that action at this time.
0 commit comments