-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamic import #862
Comments
@hosseinmd v5 doesn't have support for lazy compilation for now - when I've started the migration to rspack there was no support for lazy-compilation (but there is now), we just need to bring it back and make it work with both rspack and webpack. This is a low priority though - benefits of lazy compilation are not that great when you have rspack which is already really fast |
React-native package is not created for download from a server, so they don't care size of bundle. we could reduce it by dynamic import. |
However, I Think we are not so far to achieve it. |
could you please explain this use case a little bit more? I'm not entirely sure how you plan to use lazy compilation in production. |
Somthing a little like next js. |
So I wanted to clarify one bit: If you are looking for performance gains like in terms of app startup improvements in production by splitting the initial bundle then it's not going to be worth it - Hermes already optimizes that part, and you will likely make it slower than it was before. It's better to pack as much as you can in the initial bundle to get the best results. |
Describe the bug
On v5 i try to use dynamic import for local files (not remotes) there was an error
Environment doesn't support lazy compilation (requires EventSource)
i fixed it by this patch on webpack.How we could fix it in repack or webpack?
System Info
.
Re.Pack Version
5.0.0-rc.5
Reproduction
.
Steps to reproduce
.
The text was updated successfully, but these errors were encountered: