Instead of loading the whole framework (using React and Webpack/Parcel bundler) I want to load each component lazy loaded in each page. Only the core will be loaded on the initialisation and the component for the first page to load.
I have created a simple boilerplate GitHub repo so you can see:
Note the “src/bin/index.js” which is the starting point, it starts out with:
import Framework7 from ‘framework7/js/framework7-lite.bundle.min.js’
import Framework7React from ‘framework7-react’
This immediately imports ALL of framework7 into the bundle, and make it weight around 1.5mb which is not needed for first page to load.
How to make it possible so only when specific modules are needed they will be load?
Also note that there is a lazy loaded which I have already enabled.