Cleanups rollup integration
[e-mobility-charging-stations-simulator.git] / rollup.config.js
1 import copy from 'rollup-plugin-copy';
2 import del from 'rollup-plugin-delete';
3 import typescript from 'rollup-plugin-typescript2';
4
5 const isDevelopmentBuild = process.env.BUILD === 'development';
6
7 export default {
8 input: ['src/start.ts', 'src/charging-station/StationWorker.ts'],
9 output: {
10 dir: 'dist',
11 format: 'cjs',
12 exports: 'auto',
13 sourcemap: true,
14 preserveModules: true,
15 preserveModulesRoot: 'src'
16 },
17 external: ['crypto', 'perf_hooks', 'fs', 'path', 'poolifier', 'uuid', 'ws', 'winston-daily-rotate-file', 'winston/lib/winston/transports', 'winston', 'worker_threads'],
18 plugins: [
19 typescript({
20 tsconfig: 'tsconfig.json'
21 }),
22 del({
23 targets: 'dist/*'
24 }),
25 copy({
26 targets: [
27 { src: 'src/assets', dest: 'dist/' }
28 ]
29 })
30 ]
31 };