Understanding effect of dynamic imports on static bundle size #12087
Torgen
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Little bit of background.
I recently got a dependabot PR that bumped the version of cytoscape (Torgen/codex-blackboard#704). One of the changes in the new version is that cytoscape changed from using componentized lodash to monolithic lodash. This change increases my static bundle size by 5k, even though all the changes are only in dynamically imported modules. It seems like maybe the issue is that lodash has a large number of entry points, but I thought part of the point of how dynamic imports work in Meteor is that it knows what gets imported so it can deliver exactly the needed modules. Is it making every possible entry point to lodash available dynamically even though it should know that many of them are never used?
Beta Was this translation helpful? Give feedback.
All reactions