You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be awesome if you make an option while building react app an option that makes a script determines whether this is a legacy browser or modern one so the script can deliver the right bundle to the client
It'd be much faster for modern browsers
The text was updated successfully, but these errors were encountered:
Hi @yousefelgoharyx, of course this is possible - but generally it requires something server side.
If you'd like to take a look into a client-only solution or propose an approach, we'd definitely love to hear it. I agree that it would be great to ship the smallest bundle to every client.
A server side solution is better in this case though.
A client side solution would be possible with a small inlined script in the index.html that injected the correct script tag. However that would not allow the browser to find the script tag with the preparser and start fetching it, before it can execute JavaScript. This makes the experience worse for everyone, though modern browsers would probably regain that loss with the more efficient bundle.
A serverside solution that falls back to serving the legacy (current) bundle if not configured would solve that problem and with good documentation examples it would be easy for people to opt in to the more optimised bundle.
It'd be awesome if you make an option while building react app an option that makes a script determines whether this is a legacy browser or modern one so the script can deliver the right bundle to the client
It'd be much faster for modern browsers
The text was updated successfully, but these errors were encountered: