Hi,
I’m trying to do a redirect in the loader of my remix app and things are working fine in development. However, in production the redirect works but it doesn’t seem like any of the javascript is loaded so none of the interactions work. I noticed that the path in the URL doesn’t have the /app/onboard
at the end.
I’m just doing a simple redirect based on a boolean from prisma.
export async function loader({ request }) {
const { admin, session, redirect } = await authenticate.admin(request);
const shopData = await admin.rest.resources.Shop.all({ session: session });
const shopDomain = shopData?.data[0].domain;
let merchant = await prisma.merchant.findFirst({ where: { shop: shopDomain} })
if (!merchant?.onboarding_complete) {
return redirect(`/app/onboard`);
# url redirect to is [https://admin.shopify.com/store/dipsy-doodle-boutique/apps/littleregistry-prod](https://admin.shopify.com/store/dipsy-doodle-boutique/apps/littleregistry-prod), would expect https://admin.shopify.com/store/dipsy-doodle-boutique/apps/littleregistry-prod/app/onboard
}