Switch to rollup-plugin-typescript2 plugin
[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 export default {
6 input: ['src/start.ts', 'src/charging-station/StationWorker.ts'],
7 output: {
8 dir: 'dist',
9 format: 'cjs',
10 exports: 'auto',
11 sourcemap: true,
12 preserveModules: true,
13 preserveModulesRoot: 'src'
14 },
15 external: ['crypto', 'perf_hooks', 'fs', 'path', 'poolifier', 'uuid', 'ws', 'winston', 'winston-daily-rotate-file', 'worker_threads'],
16 plugins: [
17 typescript({
18 tsconfig: 'tsconfig.json'
19 }),
20 del({
21 targets: 'dist/*'
22 }),
23 copy({
24 targets: [
25 { src: 'src/assets', dest: 'dist/' }
26 ]
27 })
28 ]
29 };