I tried to make Lazy Loading of CMS Components, But am getting below error:
ERROR Error: The pipe 'async' could not be found!
It works fine with CSR, but with SSR it is not working.
I have Spartacus 3.4 and Angular 10.2.3 in my application.
I tried the fix given by Jerry here, https://stackoverflow.com/a/68403755/1606761
Above fix makes flicker issue in SSR.
Below is my code sample,
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CustomProductListGuard } from './custom-product-list.guard';
@NgModule({
imports: [
CommonModule,
ConfigModule.withConfig(<CmsConfig>{
cmsComponents: {
CMSProductListComponent: {
component: () => import('./container/custom-product-list.component').then(m => m.CustomProductListComponent),
guards: [CustomProductListGuard]
}
},
}),
]
})
export class CustomProductListModule {
}
Please help me to fix this.
Thanks!.