Theme dev sometimes misses file updates

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?

Theme

Expected behavior

When running shopify theme dev, remote files should be updated when changes are made to local files

Actual behavior

In some cases local files are changed but CLI does not detect the change and does not upload the new file.

Reproduction steps

Not sure exactly but I’ve noticed it happening in a consistent pattern. I have a variety of custom theme builds that all use a similar build pipeline that compiles styles from, for example a product.scss entrypoint, which imports a _product-form.scss partial, and outputs a assets/product.min.css file.

I have a watch process running and when I save the _product-form.scss it automatically recompiles and updates the assets/product.min.css file. This change is picked up by the CLI and updated as expected.

Eventually, as far as I can tell when the product reaches a certain complexity (number of asset files?), this same change does not get picked up. I save the partial _product-form.scss, my build process runs, the assets/product.min.css does get updated as expected, but the CLI doesn’t notice. If I open the asset and save without making any changes the CLI does notice and upload.

Strangely, if I update and save the product.scss entry point, the asset/product.min.css change is reliably picked up by the CLI.

Seems like there must be some difference in how my build process handles these cases but regardless, presumably the CLI should pick up the change either way - I should never have a case when my local files do not match the remote theme.

Verbose output

Verbose output is too long for this forum…

It shows nothing when this issue occurs - when it is supposed to pick up on the update and upload nothing is indicated in the output.

If there is specific (shorter) content from the output that would help debug I can provide.

Operating system

MacOS 26.2

CLI version

3.90.0

Shell

zsh

Nodejs version

24.0.1

Interesting problem! For something like this it’s best to provide us with a minimum reproducible setup (I know that sounds tough in this particular instance).

Since the CLI knows nothing about your build system it doesn’t really care about the complexity of the stylesheet, it’s just watching for changes to the filesystem. The only thing that springs to mind here is that maybe there are so many files being updated at once that somehow one of the changes gets dropped.

Have you seen this only recently or has this been a long running issue for you?

Oh my gosh someone else actually gets this issue!
Yeah I also run into this often, it’s been an issue forever.

My Styles/JS are compiled client side using a variety of tools (depending on the age of the site) i.e. Webpack, Gulp, EsBuild.
I’ll then have a “watch” running during development, anytime a SCSS/CSS/JS file is updated in a specific folder it re-compiles the JS/CSS file into assets.

Sometimes it simply does not get picked up by the Shopify CLI, the “source” folder is set to ignored for the CLI to prevent unnecessary refreshes - but it should still realise that the compiled file has changed?

The only fix I’ve found is to add a space to the compiled file and re-save, or restart the CLI :person_shrugging:
I notice it more on .css.liquid files, but maybe that’s a coincidence.

My assumptions as to “why” it breaks are:

  • Lots of files being instantaneously updated at once
  • The resulting minimized file has exactly the same number of characters/filesize and the CLI relies on that to check if there’s a difference? :thinking:

I’m on Windows 11, so it’s not OS based at least :person_shrugging: