Large bundle size
I managed to generate an analysis of the bundle, which currently weighs more than 6 MB.
-
plotly.js
is the main culprit, taking almost 50% of the bundle. This clearly needs to be replaced with a more lightweight library, or at least split into a separate bundle and loaded asynchronously on the page that requires it (with a dynamicimport()
). !379 (merged) -
Another data visualization library is present: react-vis
. We could try to use a single library for everything. -
tinymce
is not that tiny🥁 and accounts for 10% of the bundle. We could split it into a separate bundle and load it asynchronously only when needed. -
@appbase/reactivesearch
could also be loaded asynchronously since it's used only on the search page. -
I can see two bootstrap table libraries: react-bootstrap-table
andreact-bootstrap-table-next
. The latter seems to be the lightest, the most used, the most recent, and the most feature-full. We should migrate to it completely. !395 (merged) -
There is a lot more potential for improvement: d3-voronoi
(!?),react-modal
(why not use Bootstrap's Modal everywhere?), etc. -- but the above should already make a decent dent.-
Remove react-moment
!403 (merged)
-
Edited by Axel Bocciarelli