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
11 console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`))
12 console.time('Build time')
14 entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
36 'winston-daily-rotate-file',
49 './dist/assets/*.json',
50 './dist/assets/json-schemas',
51 './dist/assets/station-templates',
52 './dist/assets/ui-protocol',
53 './dist/assets/configs-docker'
59 from: ['./src/assets/config.json'],
63 from: ['./src/assets/idtags!(-template)*.json'],
67 from: ['./src/assets/json-schemas/**/*.json
'],
68 to: ['./assets/json
-schemas
']
71 from: ['./src/assets/station-templates/**/
*.json
'],
72 to: ['./assets/station-templates
']
75 from: ['./src/assets/configs-docker/*.json
'],
76 to: ['./assets/configs-docker
']
82 console.timeEnd('Build time
')