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.