shopify-theme-tailwind
shopify-theme-tailwind copied to clipboard
HMR with custom styles
Hello,
Shopify CLI seems to automatically sync all files inside the /shopify folder by detecting if there has been a change to the file, if not the page will reload completely. It's perfect because it allows you to have a HMR like for static files that don't go through tailwind & postcss via vite. But for everything that is "custom" located in the src folder, I can't get the HMR to work. Inside the src directory, files are handled by vite and then exported in the shopify/assets folder, replacing the index.min.css and js file. So normally, shopify cli should detect a change in those file and inject new code. But each time I save them I get a complete reload. This is a strange behavior and I cannot figure why, has anyone ever managed to get the HMR to work via the default configuration?