I migrated a Remix 2 app to RR7 and now when I deploy to Vercel, the app seems like it's hanging, or as if the build process didn't generate all the files. I am able to navigate around the app but I can't do anything that requires JavaScript (clicking buttons, using fullstack components etc).
For further context, this app used to use remix-island. I tried using [email protected] and [email protected], the results are the same.
My entry.client:
import { HydratedRouter } from "react-router/dom";
import Backend from "i18next-http-backend";
import { createInstance } from "i18next";
import ICU from "i18next-icu";
import LanguageDetector from "i18next-browser-languagedetector";
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";
import { initReactI18next, I18nextProvider } from "react-i18next";
import { getInitialNamespaces } from "remix-i18next/client";
import i18n from "./i18n";
async function hydrate() {
const instance = createInstance()
.use(initReactI18next)
.use(ICU)
.use(Backend)
.use(LanguageDetector);
await instance.init({
...i18n,
ns: getInitialNamespaces(),
detection: {
order: ["cookie", "htmlTag"],
caches: [],
},
});
startTransition(() => {
hydrateRoot(
document!,
<I18nextProvider i18n={instance}>
<StrictMode>
<HydratedRouter />
</StrictMode>
</I18nextProvider>
);
});
}
if (window.requestIdleCallback) {
window.requestIdleCallback(hydrate);
} else {
// Safari doesn't support requestIdleCallback
// https://caniuse.com/requestidlecallback
window.setTimeout(hydrate, 1);
}