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-dev): apply updates
[e-mobility-charging-stations-simulator.git]
/
bundle.js
diff --git
a/bundle.js
b/bundle.js
index ede14a96878f585ceccbed7208cd61038dbce685..dea5a97f58449ec15ef63971d195ac9cded35e33 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';
@@
-8,15
+9,37
@@
import { copy } from 'esbuild-plugin-copy';
const isDevelopmentBuild = env.BUILD === 'development';
const sourcemap = !!isDevelopmentBuild;
const isDevelopmentBuild = env.BUILD === 'development';
const sourcemap = !!isDevelopmentBuild;
+console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`));
+console.time('Build time');
(async () => {
await build({
entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
bundle: true,
platform: 'node',
format: 'esm',
(async () => {
await build({
entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
bundle: true,
platform: 'node',
format: 'esm',
- external: ['@mikro-orm/*'],
+ external: [
+ '@mikro-orm/*',
+ 'ajv',
+ 'ajv-formats',
+ 'basic-ftp',
+ 'chalk',
+ 'date-fns',
+ 'http-status-codes',
+ 'just-merge',
+ 'logform',
+ 'mnemonist/*',
+ 'mongodb',
+ 'node:*',
+ 'poolifier',
+ 'tar',
+ 'winston',
+ 'winston/*',
+ 'winston-daily-rotate-file',
+ 'ws',
+ ],
minify: true,
sourcemap,
minify: true,
sourcemap,
+ entryNames: '[name]',
outdir: './dist',
plugins: [
clean({
outdir: './dist',
plugins: [
clean({
@@
-52,3
+75,4
@@
const sourcemap = !!isDevelopmentBuild;
],
});
})();
],
});
})();
+console.timeEnd('Build time');