Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Shopify CLI performs full-page reload instead of hot-reload #5488

Closed
2 tasks done
aiacciu87 opened this issue Mar 5, 2025 · 1 comment
Closed
2 tasks done
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working

Comments

@aiacciu87
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

When making modifications to local files while running shopify theme dev --live-reload=hot-reload, the browser should update the modified elements dynamically without performing a full-page reload.

Actual behavior

Regardless of whether--live-reload=hot-reload is specified, Shopify CLI consistently performs a full-page reload instead of applying hot-reload. The changes appear in the browser, then it refreshes the entire page. This disrupts the workflow and slows down development.

Verbose output

verbose.txt

Reproduction steps

  1. Run shopify theme dev --live-reload=hot-reload on a Shopify theme.
  2. Open the theme in Chrome.
  3. Modify a file locally (e.g., CSS or Liquid file).
  4. Observe that the changes appear briefly, but the page reloads entirely.

Operating System

Mac OS Sequoia 15.3

Shopify CLI version (shopify --version)

3.76.1

Shell

No response

Node version (run node -v if you're not sure)

v23.9.0

What language and version are you using in your application?

No response

@aiacciu87 aiacciu87 added the Type: Bug Something isn't working label Mar 5, 2025
@karreiro karreiro added the Area: @shopify/theme @shopify/theme package issues label Mar 7, 2025
@karreiro karreiro self-assigned this Mar 7, 2025
@karreiro
Copy link
Contributor

karreiro commented Mar 7, 2025

👋 Hey @aiacciu87,

Thank you for reporting this!

The CLI triggers hot-reload events only for sections. Thus, updates in layout, config, and snippet files will trigger a full reload event. Even though, when running in hot-reload mode, the full reload doesn't need to wait and isn't blocked by the file being fully uploaded to the Shopify platform.

I've noticed in the --verbose output that that was the case, so with this clarification in mind, I'm closing this issue.

Thank you for bringing this up tho!

@karreiro karreiro closed this as completed Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants