1 /* eslint-disable n/no-unpublished-import */
2 import { env } from 'node:process';
4 import { build } from 'esbuild';
5 import { clean } from 'esbuild-plugin-clean';
6 import { copy } from 'esbuild-plugin-copy';
8 const isDevelopmentBuild = env.BUILD === 'development';
9 const sourcemap = !!isDevelopmentBuild;
13 entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'],
17 external: ['@mikro-orm/*'],
23 js: "import { createRequire } from 'module';const require = createRequire(import.meta.url);",
30 './dist/assets/*.json',
31 './dist/assets/json-schemas',
32 './dist/assets/station-templates',
33 './dist/assets/ui-protocol',
39 from: ['./src/assets/config.json'],
43 from: ['./src/assets/idtags!(-template)*.json'],
47 from: ['./src/assets/json-schemas/**/*.json
'],
48 to: ['./assets/json
-schemas
'],
51 from: ['./src/assets/station-templates/**/
*.json
'],
52 to: ['./assets/station-templates
'],