Hi, CLI is still using the “myshopify.com”, but for some clients, this link is not working since the main URL is without the myshopify.com.
Cannot we do the same as the preview link generated from the admin preview link?
Current CLI preview link: https://store.myshopify.com/?preview_theme_id=188599075202
Desired CLI preview link: https://store.com/?preview_theme_id=188599075202
Hey @Robert_Chheav
thanks for reaching out.
I see where you’re coming from here. shopify theme dev builds the preview URL from the *.myshopify.com domain and there’s no flag to override it. The Admin’s “Share preview” works because it generates the link server-side against the primary domain.
As a workaround, you should be able to hand-edit the URL and swap the host for the primary domain, keeping ?preview_theme_id= intact. That param is honored on whatever domain serves the storefront.
I can pass this along internally as a feature request, but I want to set realistic expectations that it isn’t likely to change. The CLI is just displaying a URL as a link. It doesn’t affect functionality, and changing the URL manually gets you the same result, so it isn’t on our radar as something that needs adjusting.
I hope this helps!
Thanks Wes for your answer.
Yes hand-edit do work as a workaround but it requires an extra step and having to do that is quiet annoying.