From: Jérôme Benoit Date: Sat, 30 Dec 2023 13:58:10 +0000 (+0100) Subject: refactor: cleanup bundling code X-Git-Tag: v1.2.31~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a7c99243479a27acd9cdedc5fac4ceae2ff47d47;p=e-mobility-charging-stations-simulator.git refactor: cleanup bundling code Signed-off-by: Jérôme Benoit --- diff --git a/bundle.js b/bundle.js index e96d450c..0d609c2d 100644 --- a/bundle.js +++ b/bundle.js @@ -5,11 +5,9 @@ import chalk from 'chalk' import { build } from 'esbuild' import { clean } from 'esbuild-plugin-clean' import { copy } from 'esbuild-plugin-copy' - -const isDevelopmentBuild = env.BUILD === 'development' -const sourcemap = !!isDevelopmentBuild - ;(async () => { + const isDevelopmentBuild = env.BUILD === 'development' + const sourcemap = !!isDevelopmentBuild console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`)) console.time('Build time') await build({