dea5a97f58449ec15ef63971d195ac9cded35e33
1 /* eslint-disable n/no-unpublished-import */
2 import { env } from 'node:process';
4 import chalk from 'chalk';
5 import { build } from 'esbuild';
6 import { clean } from 'esbuild-plugin-clean';
7 import { copy } from 'esbuild-plugin-copy';
9 const isDevelopmentBuild = env.BUILD === 'development';
10 const sourcemap = !!isDevelopmentBuild;
12 console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`));
13 console.time('Build time');
16 entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
37 'winston-daily-rotate-file',
49 './dist/assets/*.json',
50 './dist/assets/json-schemas',
51 './dist/assets/station-templates',
52 './dist/assets/ui-protocol',
58 from: ['./src/assets/config.json'],
62 from: ['./src/assets/idtags!(-template)*.json'],
66 from: ['./src/assets/json-schemas/**/*.json
'],
67 to: ['./assets/json
-schemas
'],
70 from: ['./src/assets/station-templates/**/
*.json
'],
71 to: ['./assets/station-templates
'],
78 console.timeEnd('Build time
');