1 /* eslint-disable n/no-unpublished-import */
2 import { cpus } from 'node:os';
4 import json from '@rollup/plugin-json';
5 import terser from '@rollup/plugin-terser';
6 import typescript from '@rollup/plugin-typescript';
7 import { copy } from '@web/rollup-plugin-copy';
8 import analyze from 'rollup-plugin-analyzer';
9 import del from 'rollup-plugin-delete';
11 const isDevelopmentBuild = process.env.BUILD === 'development';
12 const isAnalyzeBuild = process.env.ANALYZE;
15 input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
16 strictDeprecations: true,
21 sourcemap: !!isDevelopmentBuild,
22 plugins: [terser({ maxWorkers: cpus().length / 2 })],
27 '@mikro-orm/reflection',
35 'mnemonist/lru-map-with-delete.js',
48 'node:worker_threads',
52 'winston-daily-rotate-file',
53 'winston/lib/winston/transports/index.js',
59 tsconfig: 'tsconfig.json',
66 'dist/assets/json-schemas',
67 'dist/assets/station-templates',
68 'dist/assets/ui-protocol',
73 patterns: 'assets/**/*.json',
75 'assets/config-template.json',
76 'assets/*config[-_]*.json',
77 'assets/idtags-template.json',
78 'assets/authorization-tags-template.json',
79 'assets/ui-protocol/**/*',
82 isAnalyzeBuild && analyze(),