From 6d4c4e907023dfc617e5f0bf6d166bfd3468e8ac Mon Sep 17 00:00:00 2001 From: EnderDev Date: Fri, 21 Jul 2023 01:28:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Fix=20building=20main=20server?= =?UTF-8?q?=20entrypoint=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/build.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index c72dc9f..55cafd3 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -220,19 +220,21 @@ const main = async () => { ) { console.log("Compiling server..."); - const entryPoints = ["app/main.ts"]; + build({ + entryPoints: ["app/main.ts"], + ...options + }); if ( existsSync( resolve(process.cwd(), "generated", "generated.tsx") ) ) - entryPoints.push("generated/generated.tsx"); - - build({ - entryPoints, - ...options - }); + build({ + entryPoints: ["generated/generated.tsx"], + ...options, + outdir: resolve(options.outdir, "generated"), + }); console.log("Compiling pages...");