single sw build is enough if it's blocking

This commit is contained in:
Simon Knott 2024-10-25 12:55:51 +02:00
parent ebd7f071fe
commit ab93f1a234
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -275,7 +275,7 @@ for (const bundle of bundles) {
}); });
} }
// initial service worker build. // Build/watch trace viewer service worker.
steps.push({ steps.push({
command: 'npx', command: 'npx',
args: [ args: [
@ -283,11 +283,12 @@ steps.push({
'--config', '--config',
'vite.sw.config.ts', 'vite.sw.config.ts',
'build', 'build',
...(watchMode ? ['--watch', '--minify=false'] : []),
...(withSourceMaps ? ['--sourcemap=inline'] : []), ...(withSourceMaps ? ['--sourcemap=inline'] : []),
], ],
shell: true, shell: true,
cwd: path.join(__dirname, '..', '..', 'packages', 'trace-viewer'), cwd: path.join(__dirname, '..', '..', 'packages', 'trace-viewer'),
concurrent: false, concurrent: watchMode,
}); });
// Build/watch web packages. // Build/watch web packages.
@ -306,22 +307,6 @@ for (const webPackage of ['html-reporter', 'recorder', 'trace-viewer']) {
}); });
} }
// Build/watch trace viewer service worker.
steps.push({
command: 'npx',
args: [
'vite',
'--config',
'vite.sw.config.ts',
'build',
...(watchMode ? ['--watch', '--minify=false'] : []),
...(withSourceMaps ? ['--sourcemap=inline'] : []),
],
shell: true,
cwd: path.join(__dirname, '..', '..', 'packages', 'trace-viewer'),
concurrent: true,
});
// web packages dev server // web packages dev server
if (watchMode) { if (watchMode) {
steps.push({ steps.push({