-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Code splitting #27
base: master
Are you sure you want to change the base?
Code splitting #27
Conversation
Unfortunately the benefit is not so big because there's still a static dependency to the |
At least, by moving the showdown import to Answer.View as this commit does the code for the markdown converter is removed from the vendors chunk and it's only loaded when loading Question.Show. |
16f3edc
to
977be9a
Compare
Webpack production bundles (hashes omitted):
|
Hello @alfonsogarciacaro , sorry for the delay. Indeed being able to move some of the library load out of the I am just a bit worried if the increase of |
Yes, it's not a fit-all solution. We can just keep the PR as an example. If I've time I'll try to investigate more the difference in the bundles. |
I think I found an easy way to split code with Fable! Latest Fable.React beta includes
LazyComponent.FromExternalFunction
which allows you to lazy load a component while keeping the type-safe reference. Can you please give it a try and check if it works? When you click on a question it should download another chunk (0.js).