Merge branch 'main' of github.com:SAP/e-mobility-charging-stations-simulator
[e-mobility-charging-stations-simulator.git] / rollup.config.mjs
index bdc96d661e2eb2d0f0c41ee078bfad4d551cd95a..6b113491dc7bc668d70e8eba682e9d32a50a544d 100644 (file)
@@ -1,15 +1,14 @@
+import json from '@rollup/plugin-json';
 import analyze from 'rollup-plugin-analyzer';
 import copy from 'rollup-plugin-copy';
 import del from 'rollup-plugin-delete';
-import istanbul from 'rollup-plugin-istanbul';
-import json from '@rollup/plugin-json';
 import { terser } from 'rollup-plugin-terser';
 import ts from 'rollup-plugin-ts';
 
 const isDevelopmentBuild = process.env.BUILD === 'development';
 
 export default {
-  input: ['src/start.ts', 'src/ui/httpd/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
+  input: ['src/start.ts', 'src/charging-station/ChargingStationWorker.ts'],
   output: [
     {
       dir: 'dist',
@@ -33,29 +32,34 @@ export default {
     },
   ],
   external: [
-    'basic-ftp',
-    'chalk',
-    'crypto',
-    'express',
-    'fs',
     '@mikro-orm/core',
     '@mikro-orm/reflection',
+    'ajv',
+    'ajv-formats',
+    'async_hooks',
+    'basic-ftp',
+    'chalk',
+    'http',
+    'http-status-codes',
+    'just-clone',
+    'just-merge',
     'mnemonist/lru-map-with-delete',
     'moment',
     'mongodb',
-    'path',
+    'node:crypto',
+    'node:fs',
+    'node:path',
+    'node:url',
+    'node:util',
     'perf_hooks',
     'poolifier',
     'proper-lockfile',
-    'reflect-metadata',
     'tar',
-    'url',
-    'uuid',
-    'ws',
-    'winston-daily-rotate-file',
-    'winston/lib/winston/transports/index.js',
     'winston',
+    'winston-daily-rotate-file',
+    'winston/lib/winston/transports',
     'worker_threads',
+    'ws',
   ],
   plugins: [
     json(),
@@ -63,9 +67,14 @@ export default {
       tsconfig: 'tsconfig.json',
       browserslist: false,
     }),
-    isDevelopmentBuild && istanbul(),
     del({
-      targets: ['dist/*', '!dist/assets', 'dist/assets/*.json', 'dist/assets/station-templates'],
+      targets: [
+        'dist/*',
+        '!dist/assets',
+        'dist/assets/*.json',
+        'dist/assets/station-templates',
+        'dist/assets/json-schemas',
+      ],
     }),
     copy({
       targets: [{ src: 'src/assets', dest: 'dist/' }],