From 2c523744ae50c7ee710405df3988d7868283d025 Mon Sep 17 00:00:00 2001 From: Sanjeet Suhag Date: Tue, 1 Nov 2022 14:48:57 -0400 Subject: [PATCH] Fixes bundleCombinedWorkers function --- build.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build.js b/build.js index fa9a31fb1b33..4e28061483ba 100644 --- a/build.js +++ b/build.js @@ -346,7 +346,7 @@ function rollupWarning(message) { */ export async function bundleCombinedWorkers(options) { // Bundle non ES6 workers. - const workers = await globby(["Source/Workers/**"]); + const workers = await globby(["packages/engine/Source/Workers/**"]); const workerConfig = defaultESBuildOptions(); workerConfig.bundle = false; workerConfig.banner = { @@ -355,17 +355,20 @@ export async function bundleCombinedWorkers(options) { workerConfig.entryPoints = workers; workerConfig.outdir = options.path; workerConfig.minify = options.minify; + workerConfig.outbase = "packages/engine/Source"; await esbuild.build(workerConfig); // Copy ThirdParty workers - const thirdPartyWorkers = await globby(["Source/ThirdParty/Workers/**"]); + const thirdPartyWorkers = await globby([ + "packages/engine/Source/ThirdParty/Workers/**", + ]); const thirdPartyWorkerConfig = defaultESBuildOptions(); thirdPartyWorkerConfig.bundle = false; thirdPartyWorkerConfig.entryPoints = thirdPartyWorkers; thirdPartyWorkerConfig.outdir = options.path; thirdPartyWorkerConfig.minify = options.minify; - thirdPartyWorkerConfig.outbase = "Source"; + thirdPartyWorkerConfig.outbase = "packages/engine/Source"; await esbuild.build(thirdPartyWorkerConfig); // Bundle ES6 workers.