No HMR when working on Checkout UI or Admin Extensions

Setting up via the CLI, I’ve been having troubles with lack of HMR in Checkout UI and Admin UI Extensions. Theme Extensions seem to be having issues with some level of caching and while it’s manageable, developing any extension has become a pain since the CLI 3.72.2 update. Also, there seems to be a new .shopify/ folder that now exists since the 3.72 (IIRC) update that seems to be the one CLI works on.

Here’s a video showing off the entire thing: https://www.youtube.com/watch?v=EApN72a-Ddo

Node: 23.5.0 (same errors in 22.x, 18.x)
Shopify CLI: 3.72.2
macOS 15.2

Hi Harshdeep,

Thanks for flagging and including a video. Connecting with the CLI team on this - will update here asap.

I also opened an issue on Shopify/CLI Repo.

Digging into this further - I had to remove extension_directories from my shopify.app.toml and restructure project to use extensions/ directory and follow the Remix app structure to get HMR working again. At first I thought my TOML is broken but if it really was broken, I wouldn’t be able to generate and deploy extensions at all^

Update - this was solved.

The bug is in the wildcards for the extension_directories value. Using a single * works for detecting the extensions, but the file watcher interprets that as a “watch for changes in that folder, but not recursively in subfolders”. The file watcher expects a double asterisk ** to watch for changes in all subfolders.

1 Like