I’m using Shopify CLI 2.2.2.
The hot reload kicks in when a section, or CSS file changes. How can I turn it off for CSS files?
I’m using Shopify CLI 2.2.2.
The hot reload kicks in when a section, or CSS file changes. How can I turn it off for CSS files?
Nobody has even a clue? Someone from Shopify could help probably? Why is this community so quiet?
I did a fast research on Shopify CLI repo and at the moment I don’t see any possibility to disable the hot reloading just for CSS files.
Hot reloading is managed inside hot-reload.js file, but in order to add this logic, you should fork and implement it (not really suggest).
I instead suggest you that you open an issue on GitHub, explaining why you would like to have the possibility to disable CSS hot reload and wait for dev answer first.
@drakedev Thank you for the response!
I disabled it manually in the hot-reload.js
But I saw that there is an option in the **hot-reload.rb called “**ignore_filter”, do you happen to know how we can use this filter when calling the serve “shopify theme serve”?
Is it something like “shopify theme serve --ignore_filter *.css”?
I tried a bunch, but no luck with that.
Thanks again. Any insight would be appreciated.
Actually the ignore_filter ignores the files in all contexts
So maybe you could define a .shopifyignore file to use during the development to exclude specific files, it that helps.
Just remember to rename it when you are ready to push.
Let me know if it works.
@drakedev Unfortunately, the .shopifyignore ignores files on the dev environment entirely, not only disabling the hot-reload.
I will stick to the custom tweaks I made in the hot-reload.js file by now, and I just have to keep it under my radar to see if there will be an update in the future.
Thank you for the time and help.