mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-22 19:49:31 -07:00
fix webpack for new radar-worker
This commit is contained in:
@@ -97,13 +97,25 @@ const buildJs = () => src(mjsSources)
|
|||||||
.pipe(dest(RESOURCES_PATH));
|
.pipe(dest(RESOURCES_PATH));
|
||||||
|
|
||||||
const workerSources = [
|
const workerSources = [
|
||||||
'server/scripts/modules/radar-worker.mjs',
|
'./server/scripts/modules/radar-worker.mjs',
|
||||||
|
'./server/scripts/modules/radar-worker-bg-fg.mjs',
|
||||||
];
|
];
|
||||||
|
|
||||||
const buildWorkers = () => {
|
const buildWorkers = () => {
|
||||||
// update the file name in the webpack options
|
// update the file name in the webpack options
|
||||||
const output = { filename: 'radar-worker.mjs' };
|
const output = {
|
||||||
const workerWebpackOptions = { ...webpackOptions, 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)
|
return src(workerSources)
|
||||||
.pipe(webpack(workerWebpackOptions))
|
.pipe(webpack(workerWebpackOptions))
|
||||||
.pipe(dest(RESOURCES_PATH));
|
.pipe(dest(RESOURCES_PATH));
|
||||||
|
|||||||
Reference in New Issue
Block a user