X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=bundle.js;h=4bdee327fd0015cef8c3a4bc8c0e79dad72e678f;hb=2def357c05fcea4eeeaa4e0c5c8660a5cf290d2e;hp=dd6a46ca4f42f8671fab35beda34012ba54292a7;hpb=78202698774ff18a749e3bd0a04418bc23ae0137;p=e-mobility-charging-stations-simulator.git diff --git a/bundle.js b/bundle.js index dd6a46ca..4bdee327 100644 --- a/bundle.js +++ b/bundle.js @@ -9,9 +9,11 @@ import { copy } from 'esbuild-plugin-copy'; const isDevelopmentBuild = env.BUILD === 'development'; const sourcemap = !!isDevelopmentBuild; -console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`)); -console.time('Build time'); (async () => { + console.info( + chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`), + ); + console.time('Build time'); await build({ entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'], bundle: true, @@ -41,9 +43,6 @@ console.time('Build time'); sourcemap, entryNames: '[name]', outdir: './dist', - banner: { - js: "import { createRequire } from 'module';const require = createRequire(import.meta.url);", - }, plugins: [ clean({ patterns: [ @@ -77,5 +76,5 @@ console.time('Build time'); }), ], }); + console.timeEnd('Build time'); })(); -console.timeEnd('Build time');