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
Harrison Lo
Harrison LoOP2y ago
Okay we can dynamically import the React component in fetch
justboereh
justboereh2y ago
it’s probably better to use Pages instead of Workers for react apps.
Harrison Lo
Harrison LoOP2y ago
@justboereh Using worker to do SSR
justboereh
justboereh2y ago
@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).
chrisb (boscolo.eth)
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.
Want results from more Discord servers?
Add your server