theme-app-extension and app blocks in staged environments

Solved
L4webdesign
Tourist
8 0 0

Hi everybody,

 

I just updated my app to use app blocks with the theme-app-extension. I have three environments for my app: local, stage, live.

 

Now I can only use theme-app-extension for one app. But I use the same repo for all three stages. This leads to the fact that I now have three directories in my project for my three different theme-app-extension environments. I also have to push each app-extension separately, which is very very inconvenient.

 

Do you have any suggestions or a better workflow on how to tackle this problem?

 

Thank you!

 

Lee

Accepted Solution (1)

Accepted Solutions
bishpls
Tourist
3 1 2

This is an accepted solution.

Have you tried using the "Development Store Preview" functionality for theme app extensions?

 

https://shopify.dev/apps/app-extensions#app-extension-versioning

 

From your Shopify Partners account, navigate to:

App > Extensions > Select your Theme App Extension > Enable the "Development Store Preview" flag. 

 

Then create a new version for your app extension, which will only be applied to development stores until you click "Publish" to propagate it to production stores. 

 

You shouldn't need separate app repos, and can just run 

shopify extension push

as your 'build' command to test changes on the development store. 

 

(Getting the changes to refresh quickly is more annoying, as what causes Shopify to purge the internal cache for the app block is a bit unclear; I've found that loading the Online Store Theme Preview from your Admin account is reasonably reliable at purging the cached version of the dev store app block files.)

View solution in original post

Replies 2 (2)
bishpls
Tourist
3 1 2

This is an accepted solution.

Have you tried using the "Development Store Preview" functionality for theme app extensions?

 

https://shopify.dev/apps/app-extensions#app-extension-versioning

 

From your Shopify Partners account, navigate to:

App > Extensions > Select your Theme App Extension > Enable the "Development Store Preview" flag. 

 

Then create a new version for your app extension, which will only be applied to development stores until you click "Publish" to propagate it to production stores. 

 

You shouldn't need separate app repos, and can just run 

shopify extension push

as your 'build' command to test changes on the development store. 

 

(Getting the changes to refresh quickly is more annoying, as what causes Shopify to purge the internal cache for the app block is a bit unclear; I've found that loading the Online Store Theme Preview from your Admin account is reasonably reliable at purging the cached version of the dev store app block files.)

View solution in original post

L4webdesign
Tourist
8 0 0

Hey @bishpls,

 

thank you very much, yes that pretty much answers my question.

 

But now that leads me to a new question:

I basically have 3 different apps in my partners dashboard. One for local development, one for staging and for production.

 

Based on your answer it seems like you don't have those different environments or stages, or there might not even be a need for that.

 

May I ask you how do you manage different environments?