According to the upgrade guide for redwood 6.0 ( Redwood v6.0.0 Upgrade Guide - Announcements / Releases and Upgrade Guides - RedwoodJS Community, the Router was refactored to use Suspense under the hood, which is neat, except I can’t seem to get it to work. I can see in the networks tab that unused pages are still being downloaded, with Routes.tsx as the initiator.
I’ve tried to do lazy/Suspense myself, but importing lazy inside of the Routes.tsx leads to the following error: ‘ReferenceError: Cannot access ‘lazy’ before initialization’.
What gives? And what do I do to utilize code-splitting inside my app?