From ae2f5292bc112c82d4425df26da77dd8e3f6667b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 30 Oct 2023 21:10:17 +0100 Subject: [PATCH] perf: reduce bundle size by specifing external deps MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- bundle.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/bundle.js b/bundle.js index 84b45f8d..708a4de9 100644 --- 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]', -- 2.34.1