From f608a402a7add7aa4a42d0b5b5b0cad935e28593 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Wed, 13 Dec 2023 14:23:18 +0100 Subject: [PATCH] chore: add `--js-entrypoint` support to esbuild --- esbuild.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/esbuild.js b/esbuild.js index 5c0c74590fc..4c0a6e8c6b6 100644 --- a/esbuild.js +++ b/esbuild.js @@ -70,7 +70,11 @@ async function main() { /** @type { import('esbuild').BuildOptions } */ const config = { - entryPoints: ['api/bin/www.ts'], + entryPoints: [ + process.argv.includes('--js-entrypoint') + ? 'server/bin/www.js' + : 'api/bin/www.ts', + ], plugins: [nativeNodeModulesPlugin], bundle: true, platform: 'node',