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/charging-station/ChargingStationWorker.ts'],
19 preserveModules
: true,
20 preserveModulesRoot
: 'src',
21 ...!isDevelopmentBuild
&& { plugins
: [terser({ numWorkers
: 2 })] }
23 external
: ['basic-ftp', 'chalk', 'crypto', 'fs', '@mikro-orm/core', '@mikro-orm/reflection', 'mongodb', 'path', 'perf_hooks', 'poolifier', 'proper-lockfile', 'reflect-metadata', 'tar', 'url', 'uuid', 'ws', 'winston-daily-rotate-file', 'winston/lib/winston/transports', 'winston', 'worker_threads'],
27 tsconfig
: 'tsconfig.json',
30 isDevelopmentBuild
&& istanbul(),
36 { src
: 'src/assets', dest
: 'dist/' }
39 isDevelopmentBuild
&& analyze()