refactor: cleanup package.json version usage
[e-mobility-charging-stations-simulator.git] / rollup.config.mjs
index 82b5b79aa27de94041111165e4d95eb415334288..1034ffc812825d1adcc7005ac13ce24f48b8f02d 100644 (file)
@@ -1,5 +1,5 @@
 /* eslint-disable n/no-unpublished-import */
-import os from 'os';
+import { cpus } from 'node:os';
 
 import json from '@rollup/plugin-json';
 import terser from '@rollup/plugin-terser';
@@ -19,7 +19,7 @@ export default {
       dir: 'dist',
       format: 'esm',
       sourcemap: !!isDevelopmentBuild,
-      plugins: [terser({ maxWorkers: os.cpus().length / 2 })],
+      plugins: [terser({ maxWorkers: cpus().length / 2 })],
     },
   ],
   external: [
@@ -33,6 +33,7 @@ export default {
     'just-clone',
     'just-merge',
     'mnemonist/lru-map-with-delete.js',
+    'mnemonist/queue.js',
     'moment',
     'mongodb',
     'node:async_hooks',
@@ -57,6 +58,9 @@ export default {
     json(),
     typescript({
       tsconfig: 'tsconfig.json',
+      compilerOptions: {
+        sourceMap: !!isDevelopmentBuild,
+      },
     }),
     del({
       targets: [
@@ -73,8 +77,9 @@ export default {
       patterns: 'assets/**/*.json',
       exclude: [
         'assets/config-template.json',
-        'assets/*config[-_]*.json',
+        'assets/*config[-_.]*.json',
         'assets/idtags-template.json',
+        'assets/authorization-tags-template.json',
         'assets/ui-protocol/**/*',
       ],
     }),