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 typescript
from 'rollup-plugin-typescript2';
9 const isDevelopmentBuild
= process
.env
.BUILD
=== 'development';
12 input
: ['src/start.ts', 'src/charging-station/StationWorker.ts'],
19 preserveModules
: true,
20 preserveModulesRoot
: 'src',
21 ...!isDevelopmentBuild
&& { plugins
: [terser({ numWorkers
: 2 })] }
23 external
: ['basic-ftp', 'crypto', 'perf_hooks', 'fs', 'path', 'poolifier', 'tar', 'url', 'uuid', 'ws', 'winston-daily-rotate-file', 'winston/lib/winston/transports', 'winston', 'worker_threads'],
27 tsconfig
: 'tsconfig.json'
29 isDevelopmentBuild
&& istanbul(),
35 { src
: 'src/assets', dest
: 'dist/' }
38 isDevelopmentBuild
&& analyze()