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.
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^
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.