Questions and discussions about using the Shopify CLI and Shopify-built libraries.
I switched my Schopify-cli created app to be a non-embedded app by disabling it in the partners app settings as described here:https://help.shopify.com/en/api/embedded-apps/app-extensions/shopify-admin/embed-in-shopify-admin
After doing that and re-installing the app on my development store, it now opens in a new tab. However after the page has loaded in a new tab it jumps back to Shopify and displays like an embedded app. How can I fix this so it stays in its own tab? My app is bare-bones created from the Shopify-cli.
I want to switch it to a non-embedded app to be able to debug the app, based on this thread: https://community.shopify.com/c/Shopify-APIs-SDKs/How-to-debug-Shopify-react-app/m-p/602282#M40801
Solved! Go to the solution
This is an accepted solution.
Are you using AppBridge/Polaris? It usually will do a redirect unless specified otherwise: https://github.com/Shopify/shopify-app-node/blob/master/pages/_app.js#L26
I usually put:
forceRedirect: process.env.NODE_ENV === "production"
on the App Bridge which basically means only redirect when in production mode so that dev mode loads app in a different window outside of the admin.
This is an accepted solution.
Are you using AppBridge/Polaris? It usually will do a redirect unless specified otherwise: https://github.com/Shopify/shopify-app-node/blob/master/pages/_app.js#L26
I usually put:
forceRedirect: process.env.NODE_ENV === "production"
on the App Bridge which basically means only redirect when in production mode so that dev mode loads app in a different window outside of the admin.
Thank you! That was it. I missed that parameter.