Hello Meteorians,
I’m currently trying to reduce the Cordova App Size by using dynamic imports. I have the plotly library, size 3.5 mb. It is reduced in the webApp, but in web.cordova, size is still the same. I added a screenshot using
meteor --extra-packages bundle-visualizer --production
Here’s the source code. I also tried “@loadable/component”, which works for webApp, but not for web.cordova.
import React, { Suspense } from 'react'
const Plot = React.lazy(() => import('../../../../../node_modules/react-plotly.js/react-plotly'))
export default function LazyPlot(props) {
return (
<Suspense fallback={<div></div>}>
<Plot {...props} />
</Suspense>
)
}
Thank you for helping me