X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=rollup.config.js;h=53d9cb33ad6894373aa688f4e0ad7c11fac00819;hb=903becc3931c3c84d91eb1ce1ecc2f5e3237607b;hp=8825169f7c3e8eeb83b164480ca1f9e8bb7471ff;hpb=ae8ee665e864460d582b7f6d501b25225a1d7a4c;p=e-mobility-charging-stations-simulator.git diff --git a/rollup.config.js b/rollup.config.js index 8825169f..53d9cb33 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -9,33 +9,52 @@ import ts from 'rollup-plugin-ts'; const isDevelopmentBuild = process.env.BUILD === 'development'; export default { - input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'], - output: - { + input: ['src/start.ts', 'src/ui/httpd/start.ts', 'src/charging-station/ChargingStationWorker.ts'], + output: { dir: 'dist', format: 'cjs', exports: 'auto', sourcemap: true, preserveModules: true, preserveModulesRoot: 'src', - ...!isDevelopmentBuild && { plugins: [terser({ numWorkers: 2 })] } + ...(!isDevelopmentBuild && { plugins: [terser({ numWorkers: 2 })] }), }, - external: ['basic-ftp', 'chalk', 'crypto', 'fs', '@mikro-orm/core', '@mikro-orm/reflection', 'mongodb', 'path', 'perf_hooks', 'poolifier', 'reflect-metadata', 'tar', 'url', 'uuid', 'ws', 'winston-daily-rotate-file', 'winston/lib/winston/transports', 'winston', 'worker_threads'], + external: [ + 'basic-ftp', + 'chalk', + 'crypto', + 'express', + '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', + ], plugins: [ json(), ts({ tsconfig: 'tsconfig.json', - browserslist: false + browserslist: false, }), isDevelopmentBuild && istanbul(), del({ - targets: 'dist/*' + targets: ['dist/*', '!dist/assets', 'dist/assets/*.json', 'dist/assets/station-templates'], }), copy({ - targets: [ - { src: 'src/assets', dest: 'dist/' } - ] + targets: [{ src: 'src/assets', dest: 'dist/' }], }), - isDevelopmentBuild && analyze() - ] + isDevelopmentBuild && analyze(), + ], };