X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=rollup.config.js;h=b1114284ea7bbe9d5d596fd46d04ce11f3a8a2e4;hb=78085c42a98966f7118f2575b2fde9a386399c94;hp=3900559c0e016c2a482f2a7b56a5acc450402b5e;hpb=c63c21bce46d9230688d0c5ebd31f5dd861324de;p=e-mobility-charging-stations-simulator.git diff --git a/rollup.config.js b/rollup.config.js index 3900559c..b1114284 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -10,32 +10,50 @@ const isDevelopmentBuild = process.env.BUILD === 'development'; export default { input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'], - output: - { + 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', 'proper-lockfile', 'reflect-metadata', 'tar', 'url', 'uuid', 'ws', 'winston-daily-rotate-file', 'winston/lib/winston/transports', 'winston', 'worker_threads'], + external: [ + 'basic-ftp', + 'chalk', + 'crypto', + '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/*', }), copy({ - targets: [ - { src: 'src/assets', dest: 'dist/' } - ] + targets: [{ src: 'src/assets', dest: 'dist/' }], }), - isDevelopmentBuild && analyze() - ] + isDevelopmentBuild && analyze(), + ], };