How to serve react pages within the 200ms startup time limit?
wrangler deploy
now regularly gives me "Script startup exceeded CPU time limit." Using lazy
and Suspense
don't seem to help. The gzip size of the app is around 600kb. What are some strategies people use to serve react apps?5 Replies
Okay we can dynamically import the React component in fetch
it’s probably better to use Pages instead of Workers for react apps.
@justboereh Using worker to do SSR
@harrisonlo I’m pretty sure SSR React will work in Pages, but i’m not 100% sure since I deployed Nuxt instead of React.
Unless you’re building you’re own SSR (like you’re not using a meta framework like Next.js).
Are there any other tips for troubleshooting "Script startup exceeded CPU time limit."?
I have a small small script:
Total Upload: 388.83 KiB / gzip: 91.02 KiB
And it does almost no initialization at startup, but I cannot deploy it.