mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-14 15:49:31 -07:00
cache-busting for radar worker
This commit is contained in:
@@ -96,6 +96,19 @@ const buildJs = () => src(mjsSources)
|
||||
.pipe(webpack(webpackOptions))
|
||||
.pipe(dest(RESOURCES_PATH));
|
||||
|
||||
const workerSources = [
|
||||
'server/scripts/modules/radar-worker.mjs',
|
||||
];
|
||||
|
||||
const buildWorkers = () => {
|
||||
// update the file name in the webpack options
|
||||
const output = { filename: 'radar-worker.mjs' };
|
||||
const workerWebpackOptions = { ...webpackOptions, output };
|
||||
return src(workerSources)
|
||||
.pipe(webpack(workerWebpackOptions))
|
||||
.pipe(dest(RESOURCES_PATH));
|
||||
};
|
||||
|
||||
const cssSources = [
|
||||
'server/styles/main.css',
|
||||
];
|
||||
@@ -189,7 +202,7 @@ const buildPlaylist = async () => {
|
||||
return file('playlist.json', JSON.stringify(playlist)).pipe(dest('./dist'));
|
||||
};
|
||||
|
||||
const buildDist = series(clean, parallel(buildJs, compressJsData, compressJsVendor, copyCss, compressHtml, copyOtherFiles, buildPlaylist, copyImageSources));
|
||||
const buildDist = series(clean, parallel(buildJs, buildWorkers, compressJsData, compressJsVendor, copyCss, compressHtml, copyOtherFiles, copyImageSources, buildPlaylist));
|
||||
|
||||
// upload_images could be in parallel with upload, but _images logs a lot and has little changes
|
||||
// by running upload last the majority of the changes will be at the bottom of the log for easy viewing
|
||||
|
||||
Reference in New Issue
Block a user