Topic: ng-uikit-pro-standard is loaded totally on main.js even if single modules imported in lazy loaded modules
Importing the single modules instead of the whole module with .root() should not import the whole library inside the main.js bundle, causing a huge size of it.
ng-uikit-pro-standard is loaded totally on main.js even if single modules imported in lazy loaded modules and they are not imported in app.module.
In the screenshot the stats, showing ng-uikit-pro-standard is imported as whole library instead of be splitted into modules and loaded in the lazy loading modules.
I talked with other Italians developers and seems like this library has no a good reputation because seems not soo optimised for production environment (and this is a clear example, it makes the main.js size too big). I hope to they are wrong.
Answered
- User: Pro
- Premium support: Yes
- Technology: Angular
- MDB Version: 9.3.0
- Device: All
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 8 months ago
Thank you, we will make some tests on our end to check that.
sjardine pro premium priority commented 2 months ago
Any news on this issue?
Arkadiusz Idzikowski staff commented 2 months ago
We checked that for different configurations (with main MDB module containing all modules and with single MDB modules) and we observed significant differences in bundle size (tested on v10.0.0 with
ng build --prod
).We still need to make some additional tests and consider adding some improvements (like secondary entry points), however, this may require a complete rebuild of the library building process.