repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps): apply updates
[e-mobility-charging-stations-simulator.git]
/
bundle.js
diff --git
a/bundle.js
b/bundle.js
index 708a4de99dc246f14658f5acd2a02957ec7dc5f2..4bdee327fd0015cef8c3a4bc8c0e79dad72e678f 100644
(file)
--- a/
bundle.js
+++ b/
bundle.js
@@
-1,6
+1,7
@@
/* eslint-disable n/no-unpublished-import */
import { env } from 'node:process';
/* eslint-disable n/no-unpublished-import */
import { env } from 'node:process';
+import chalk from 'chalk';
import { build } from 'esbuild';
import { clean } from 'esbuild-plugin-clean';
import { copy } from 'esbuild-plugin-copy';
import { build } from 'esbuild';
import { clean } from 'esbuild-plugin-clean';
import { copy } from 'esbuild-plugin-copy';
@@
-9,6
+10,10
@@
const isDevelopmentBuild = env.BUILD === 'development';
const sourcemap = !!isDevelopmentBuild;
(async () => {
const sourcemap = !!isDevelopmentBuild;
(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,
await build({
entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
bundle: true,
@@
-24,12
+29,13
@@
const sourcemap = !!isDevelopmentBuild;
'http-status-codes',
'just-merge',
'logform',
'http-status-codes',
'just-merge',
'logform',
- 'mnemonist',
+ 'mnemonist
/*
',
'mongodb',
'node:*',
'poolifier',
'tar',
'winston',
'mongodb',
'node:*',
'poolifier',
'tar',
'winston',
+ 'winston/*',
'winston-daily-rotate-file',
'ws',
],
'winston-daily-rotate-file',
'ws',
],
@@
-37,9
+43,6
@@
const sourcemap = !!isDevelopmentBuild;
sourcemap,
entryNames: '[name]',
outdir: './dist',
sourcemap,
entryNames: '[name]',
outdir: './dist',
- banner: {
- js: "import { createRequire } from 'module';const require = createRequire(import.meta.url);",
- },
plugins: [
clean({
patterns: [
plugins: [
clean({
patterns: [
@@
-73,4
+76,5
@@
const sourcemap = !!isDevelopmentBuild;
}),
],
});
}),
],
});
+ console.timeEnd('Build time');
})();
})();