0

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!.

user1606761
  • 105
  • 11

1 Answers1

0

Issues with SSR flickering with a user logged in have come up before. Have you tried enabling transfer state?

Here are some more in-depth recommendations: https://stackoverflow.com/a/65883085/12566149

Caine Rotherham
  • 306
  • 1
  • 5