1 /* eslint-disable n/no-unpublished-import */
2 import json from '@rollup/plugin-json';
3 import terser from '@rollup/plugin-terser';
4 import typescript from '@rollup/plugin-typescript';
5 import analyze from 'rollup-plugin-analyzer';
6 import copy from 'rollup-plugin-copy';
7 import del from 'rollup-plugin-delete';
9 const isDevelopmentBuild = process.env.BUILD === 'development';
12 input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
13 strictDeprecations: true,
20 preserveModules: true,
21 preserveModulesRoot: 'src',
22 entryFileNames: '[name].mjs',
23 ...(!isDevelopmentBuild && { plugins: [terser({ maxWorkers: 2 })] }),
28 '@mikro-orm/reflection',
36 'mnemonist/lru-map-with-delete.js',
48 'node:worker_threads',
53 'winston-daily-rotate-file',
54 'winston/lib/winston/transports/index.js',
60 tsconfig: 'tsconfig.json',
67 'dist/assets/json-schemas',
68 'dist/assets/station-templates',
69 'dist/assets/ui-protocol',
73 targets: [{ src: 'src/assets', dest: 'dist/' }],
75 isDevelopmentBuild && analyze(),