Splitting Frontend into Multiple Bundles

Hey there, just a simple question but I currently can’t make it work:

I start with meteor+react+typescript+SSR (the community package)+react router. Now I’d like to split the frontend into multiple distinct ones, like:

  • the customer facing part with its own index.html + css/js bundles (with pages mounted on the root “/”)
  • an admin part with its own index.html + css/js bundles (with pages mounted on a namespace like “/admin”

And I dont want to balloon the client bundle size by having iE all reporting components in the client bundle. What is the current way to do this? I tried a few ways of dynamic import, but since I am tacked to react 17 (in order for SSR to work), at some point I get an error with suspense is not working in react 17. Any ideas?

You need this package if you need SSR + Lazy loading + React 17

1 Like

thanks a lot, will have a look!