From e2e22517b6871f5109ea5110d824633453bddbec Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Fri, 13 Jun 2025 22:27:36 -0500 Subject: [PATCH] fix webpack for new radar-worker --- gulp/publish-frontend.mjs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gulp/publish-frontend.mjs b/gulp/publish-frontend.mjs index 0042b5a..ccc3a21 100644 --- a/gulp/publish-frontend.mjs +++ b/gulp/publish-frontend.mjs @@ -97,13 +97,25 @@ const buildJs = () => src(mjsSources) .pipe(dest(RESOURCES_PATH)); const workerSources = [ - 'server/scripts/modules/radar-worker.mjs', + './server/scripts/modules/radar-worker.mjs', + './server/scripts/modules/radar-worker-bg-fg.mjs', ]; const buildWorkers = () => { // update the file name in the webpack options - const output = { filename: 'radar-worker.mjs' }; - const workerWebpackOptions = { ...webpackOptions, output }; + const output = { + chunkFilename: '[id].mjs', + chunkFormat: 'module', + filename: '[name].mjs', + }; + const workerWebpackOptions = { + ...webpackOptions, + output, + entry: { + 'radar-worker': workerSources[0], + 'radar-worker-bg-fg': workerSources[1], + }, + }; return src(workerSources) .pipe(webpack(workerWebpackOptions)) .pipe(dest(RESOURCES_PATH));