Does Kendo for Angular support the @defer
syntax introduced in recent Angular releases?
In my production build my main.js
build is 2.1mb (and in dev builds, vendor.js
is 12.1mb). And I am on a slow network. I need to get the initial load time of the application down.
I would like to lazy-load the kendo components (especially grid). Is this possible?
I have experimented with this by locating a kendo component that is only used in one location in the application and wrapping it in @defer
(in this case the Scorecards, I import CardModule
in the associated ts file for the component.
According to the docs, only standalone components are deferrable. Kendo has the migration to standalone on their roadmap and as per v16.6.0 changelog, they have recently migrated all their packages to standalone. So it should be possible to defer the loading of Kendo components starting from v16.6.0.