1 import analyze
from 'rollup-plugin-analyzer';
2 import copy
from 'rollup-plugin-copy';
3 import del
from 'rollup-plugin-delete';
4 import istanbul
from 'rollup-plugin-istanbul';
5 import json
from '@rollup/plugin-json';
6 import { terser
} from 'rollup-plugin-terser';
7 import ts
from 'rollup-plugin-ts';
9 const isDevelopmentBuild
= process
.env
.BUILD
=== 'development';
12 input
: ['src/start.ts', 'src/ui/httpd/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
18 preserveModules
: true,
19 preserveModulesRoot
: 'src',
20 ...(!isDevelopmentBuild
&& { plugins
: [terser({ numWorkers
: 2 })] }),
29 '@mikro-orm/reflection',
40 'winston-daily-rotate-file',
41 'winston/lib/winston/transports',
48 tsconfig
: 'tsconfig.json',
51 isDevelopmentBuild
&& istanbul(),
53 targets
: ['dist/*', '!dist/assets', 'dist/assets/*.json', 'dist/assets/station-templates'],
56 targets
: [{ src
: 'src/assets', dest
: 'dist/' }],
58 isDevelopmentBuild
&& analyze(),