From d19ab6e060ba0bf8c12374ab64e2978d44e27d2d Mon Sep 17 00:00:00 2001 From: 0xTHAC0 Date: Thu, 24 Sep 2026 19:38:42 +0530 Subject: [PATCH] :bug: Reorder watch handler steps to prevent sprite deletion (#11198) copyAssets uses rsync --delete which removes the sprites/ directory from resources/public/images/ because it only exists in public, not in the source resources/images/ tree. compileSvgSprites must run AFTER copyAssets so the generated sprites are not deleted before compileTemplates reads them. The initial build sequence (lines 65-70) already had the correct order; the watch handlers in watch.js and watch-storybook.js were reversed. --- frontend/scripts/watch-storybook.js | 2 +- frontend/scripts/watch.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/scripts/watch-storybook.js b/frontend/scripts/watch-storybook.js index d2bef90884..2dfaef9ab0 100644 --- a/frontend/scripts/watch-storybook.js +++ b/frontend/scripts/watch-storybook.js @@ -81,8 +81,8 @@ h.watch("translations", null, async function (path) { log.info("watch: assets (~)"); h.watch(["resources/images", "resources/fonts"], null, async function (path) { log.info("changed:", path); - await h.compileSvgSprites(); await h.copyAssets(); + await h.compileSvgSprites(); await h.compileTemplates(); }); diff --git a/frontend/scripts/watch.js b/frontend/scripts/watch.js index 700874be74..e3094263b8 100644 --- a/frontend/scripts/watch.js +++ b/frontend/scripts/watch.js @@ -101,8 +101,8 @@ h.watch("translations", null, async function (path) { log.info("watch: assets (~)"); h.watch(["resources/images", "resources/fonts"], null, async function (path) { log.info("changed:", path); - await h.compileSvgSprites(); await h.copyAssets(); + await h.compileSvgSprites(); await h.compileTemplates(); });