SAP Spartacus 懒加载 Customized CMS Component 的问题

谢夜洛
2023-12-01

Lazy-loaded overriden or custom CMS Components

SAP Spartacus 有两种 lazy load 方式:

  1. CMS-driven lazy loading of feature modules",as explained here

以 feature module 的方式加载。

2.以 Component 为粒度进行加载: lazy loading of separate components (using component: () => import())

前者更优。

Using component: () => import() will lazy load only component code (no module, unless defined in the same file)

上述语法只能懒加载单个的 Component.

  • is it possible to lazy-load components which we have overriden, for example BannerComponent, SearchBoxComponent…?

答案:yes. 这里可以看到更多明细。

  • is it possible to apply lazy-load on custom CMS components ?
    答案:yes.
 类似资料: