I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isn’t a duplicate
In which of these areas are you experiencing a problem?
Extension
Expected behavior
For customer-account UI extensions:
A single code change under src/ should result in one “Extension changed” event per affected extension directory and one build cycle, leading to a single live reload in the browser.
Rebuilds should not keep re-triggering without further file changes from the developer.
Actual behavior
For the customer-account UI extension directory with 4 extensions declared in one toml file:
A single file change under extensions/customer-account-ui/src produces multiple waves of Build successful messages and multiple live reloads in the browser.
During this time, the browser performs multiple live reloads for the same small code change, and app-preview prints repeated “Updated dev preview on …” lines.
Screenshot:
Reproduction steps
-
run
pnpm run devcommand in this demo shopify app repository:
GitHub - BearKid/shopify-cli-extensions-change-detect-issue · GitHub- the key point is : In
extensions/customer-account-ui/shopify.extension.toml, define four[[extensions]]blocks of type ui_extension, each with its own handle and[[extensions.targeting]]pointing into./src/xxx.tsx.
- the key point is : In
-
Make a small change in a single source file under
extensions/customer-account-ui/src, for example update some text inCustomerAccountPage1.jsx -
Observe the CLI logs and browser behavior.
This issue isn’t particularly severe in the example repository mentioned above, but in my production codebase, the frequency of repeated builds and live reloads is extremely high. This may be related to the amount of code being compiled and the time it takes to do so.
Verbose output
The output logs are extremely voluminous. Please follow the reproduction steps to get the verbose logs.
Operating system
Windows 11
CLI version
3.91.1
