Skip to content

Commit

Permalink
Fixes bundleCombinedWorkers function
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeetsuhag committed Nov 1, 2022
1 parent 6864d01 commit 2c52374
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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.
Expand Down

0 comments on commit 2c52374

Please sign in to comment.