Re: The snippets not change on storefont after deploy latest code to fly.io

The snippets not change on storefont after deploy latest code to fly.io

letmepro
Shopify Partner
4 0 3

Hi there,

I'm getting an issue and I'm not sure how can solve it. 

I wrote an app block to make some customization on the storefront. Everything works well with development mode. However, when I deploy the app to fly.io and run it in production mode, the snippets file is not updated on storefont.

I'm not sure Shopify implements any cache layer. Is there any idea to solve it? 

I will highly appreciate any suggestion.

Thank you!

 

Replies 2 (2)

wil_dev
Shopify Partner
12 0 2

Hi,

Do you create or update assets with api rest?

letmepro
Shopify Partner
4 0 3

Hi Wil_dev,

Thank you for your suggestion! I found the root cause. It caused by I compile vite generated cli into npm run dev. So when I tried with development mode, it push the snippets to the store dev. 

To fix this bug, I have run the command build again so that vite generate correct the snippet files then run: npm run shopify:dev to push the snippet files to the store again.