If you're having issues don't hesitate to reach out on Discord!
This is optional but recommended for .
First rename your entry point file from main.tsx (or main.ts) to main.lazy.tsx
Then create a new main.tsx file:
Comming soon, .
You can skip this for now. It will be explained in the dedicated setup guide:
First rename your entry point file from main.tsx
main.tsmain.lazy.tsxThen create a new index.tsx file:
npm install oidc-spayarn add oidc-spapnpm add oidc-spabun add oidc-spamv src/main.tsx src/main.lazy.tsximport { oidcEarlyInit } from "oidc-spa/entrypoint";
const { shouldLoadApp } = oidcEarlyInit({
freezeFetch: true,
freezeXMLHttpRequest: true
});
if (shouldLoadApp) {
import("./main.lazy");
}mv src/index.tsx src/index.lazy.tsximport { oidcEarlyInit } from "oidc-spa/entrypoint";
const { shouldLoadApp } = oidcEarlyInit({
freezeFetch: true,
freezeXMLHttpRequest: true
});