perf: reduce bundle size by specifing external deps
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 30 Oct 2023 20:10:17 +0000 (21:10 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 30 Oct 2023 20:10:17 +0000 (21:10 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
bundle.js

index 84b45f8df4a15c8de630b779d860c41449a8310b..708a4de99dc246f14658f5acd2a02957ec7dc5f2 100644 (file)
--- a/bundle.js
+++ b/bundle.js
@@ -14,7 +14,25 @@ const sourcemap = !!isDevelopmentBuild;
     bundle: true,
     platform: 'node',
     format: 'esm',
-    external: ['@mikro-orm/*'],
+    external: [
+      '@mikro-orm/*',
+      'ajv',
+      'ajv-formats',
+      'basic-ftp',
+      'chalk',
+      'date-fns',
+      'http-status-codes',
+      'just-merge',
+      'logform',
+      'mnemonist',
+      'mongodb',
+      'node:*',
+      'poolifier',
+      'tar',
+      'winston',
+      'winston-daily-rotate-file',
+      'ws',
+    ],
     minify: true,
     sourcemap,
     entryNames: '[name]',