Commit | Line | Data |
---|---|---|
c4a19794 | 1 | import copy from 'rollup-plugin-copy'; |
44b07a21 | 2 | import del from 'rollup-plugin-delete'; |
c4a19794 | 3 | import typescript from 'rollup-plugin-typescript2'; |
44b07a21 | 4 | |
1d064457 JB |
5 | const isDevelopmentBuild = process.env.BUILD === 'development'; |
6 | ||
44b07a21 JB |
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 | }, | |
1d064457 | 17 | external: ['crypto', 'perf_hooks', 'fs', 'path', 'poolifier', 'uuid', 'ws', 'winston-daily-rotate-file', 'winston/lib/winston/transports', 'winston', 'worker_threads'], |
44b07a21 | 18 | plugins: [ |
c4a19794 | 19 | typescript({ |
44b07a21 JB |
20 | tsconfig: 'tsconfig.json' |
21 | }), | |
22 | del({ | |
23 | targets: 'dist/*' | |
c4a19794 JB |
24 | }), |
25 | copy({ | |
26 | targets: [ | |
27 | { src: 'src/assets', dest: 'dist/' } | |
28 | ] | |
44b07a21 JB |
29 | }) |
30 | ] | |
31 | }; |