Closed iska31 closed 12 months ago
The Shopify CLI hot reloads changes to sections and css files during dev. You would want to change that behavior to full-page --live-reload full-page
so that your Tailwind styles apply correctly. https://shopify.dev/docs/themes/tools/cli/commands#dev
Thanks a lot for the details 🙏
https://github.com/barrel/shopify-vite/assets/5134470/0cfd3522-8556-473b-91f3-fe7e792bda28
Okay all good thank you. It works only by adding the Shopify cli flags.
Could you explain me the use-cases for the usages of your module vite-plugin-page-reload
please ?
It can be used to reload the page where the Shopify CLI cannot, e.g. within the theme editor or the .myshopify.com domain.
Hello,
I'm using tailwind on my boilerplate with
"vite-plugin-shopify": "^2.2.1"
To reproduce :
As a result :
I re-hit the save key on my IDE => My tw class get loaded.
Edge cases
Thus, the issue seems to appear when tailwind first init its class.
vite.config.ts
postcss.config.ts
Ideally, when saving a liquid file I would need to "wait" until the tailwind css file finish to load on the local vite server.
I was hopping
vite-plugin-page-reload
to solve the issue with the newly added debounce function, but I might have misunderstood the goal of this package.