0
votes

I was able to succesfully lazy load certain modules, but if I define custom component for OOTB Spartacus component inside one module - the custom component won't be displayed on the storefront, the OOTB one will be. On the other side this is working fine for custom CMS components. Any ideas what could be the issue? I can see the configuration of custom component inside the generated chunk. FYI I am using Spartacus version 2.1.4

Example for app.module.ts

Example for lazy loaded module

2

2 Answers

0
votes

I think it may be related to this issue: https://github.com/SAP/spartacus/issues/11287

I recommend waiting for a ticket to be finished (it's in progress) and maybe considering adding a comment to it, that you really would benefit from it in Spartacus 2.1.x (as by default it will be released in the current and latest stable minor version, which at the moment of writing respectively is 3.2 and 3.1.x).

0
votes

We treat the cms mapping in the lazy loaded feature as default one which can be overridden by the static configuration. So, to make your custom component work, you have to remove that OOTB Spartacus module from imports.