806f66c5a93b1f00fd07dffd1782da9b2d0d98c7
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'],
35 'winston-daily-rotate-file',
47 './dist/assets/*.json',
48 './dist/assets/json-schemas',
49 './dist/assets/station-templates',
50 './dist/assets/ui-protocol',
51 './dist/assets/configs-docker'
57 from: ['./src/assets/config.json'],
61 from: ['./src/assets/idtags!(-template)*.json'],
65 from: ['./src/assets/json-schemas/**/*.json
'],
66 to: ['./assets/json
-schemas
']
69 from: ['./src/assets/station-templates/**/
*.json
'],
70 to: ['./assets/station-templates
']
73 from: ['./src/assets/configs-docker/*.json
'],
74 to: ['./assets/configs-docker
']
80 console.timeEnd('Build time
')