aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPrimiano Tucci <primiano@google.com>2024-05-16 18:22:31 +0100
committerPrimiano Tucci <primiano@google.com>2024-05-16 17:23:38 +0000
commit42c6d616a691d7b17f3966658dc79f2542e7f7a3 (patch)
tree5357017d1a50cc6d8ef3ddd651965b1b1526029a /ui
parent44b3d8456c4a942e862bfcf14d998f5f3ff0d2c4 (diff)
downloadperfetto-42c6d616a691d7b17f3966658dc79f2542e7f7a3.tar.gz
ui: avoid multi-reload on live dev server
Today when saving a .ts file we often get multiple reloads of the UI. This is because the current rules trigger a livereload for every file change in dist/. What happens when you edit a .ts file is that: - frontend_bundle.js or engine_bundle.js gets updated. - The source map (e.g., frontend_bundle.js.map) gets updated. - The manifest.json (for serviceworker) get updated. In 99% of cases developers care only about the first one. Filtering out notification and propagating only js|css|wasm|html changes. Change-Id: Iad5720b19004042d791ecdd0fe8ecd9c8155642e
Diffstat (limited to 'ui')
-rw-r--r--ui/build.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/build.js b/ui/build.js
index 56745df41..2aaa349d9 100644
--- a/ui/build.js
+++ b/ui/build.js
@@ -127,7 +127,7 @@ const RULES = [
f: copyUiTestArtifactsAssets,
},
{r: /.*\/dist\/.+\/(?!manifest\.json).*/, f: genServiceWorkerManifestJson},
- {r: /.*\/dist\/.*/, f: notifyLiveServer},
+ {r: /.*\/dist\/.*[.](js|html|css|wasm)$/, f: notifyLiveServer},
];
const tasks = [];