build: properly account build time
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 30 Nov 2023 21:29:18 +0000 (22:29 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 30 Nov 2023 21:29:18 +0000 (22:29 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
bundle.js

index dea5a97f58449ec15ef63971d195ac9cded35e33..ec12c5da80190df2696f816bae9a3f6015202084 100644 (file)
--- a/bundle.js
+++ b/bundle.js
@@ -10,8 +10,8 @@ const isDevelopmentBuild = env.BUILD === 'development';
 const sourcemap = !!isDevelopmentBuild;
 
 console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`));
-console.time('Build time');
 (async () => {
+  console.time('Build time');
   await build({
     entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
     bundle: true,
@@ -74,5 +74,5 @@ console.time('Build time');
       }),
     ],
   });
+  console.timeEnd('Build time');
 })();
-console.timeEnd('Build time');