文件目录:@Spartacus-storefront:
把这个B2cStorefrontModule改成StorefrontModule,因为后者不会提供一些default配置,所以运行时会有很多关于default Implementation的警告信息:
页面也无法正常渲染:
对比正常的B2cStorefrontModule.withConfig环境下的console打印:
B2cStorefrontModule
StorefrontModule
StorefrontFoundationModule
2021-6-3 更新
if you only want to provide configuration, the current recommended approach is to use provideConfig(), but ConfigModule.withConfig() will work exactly the same.
B2cStorefrontModule wraps all default modules for default b2c storefront into one huge module, it allows to quickly setup storefront (with one import and ability to provide configration with withConfig), so it’s better suited to quickly setup spartacus than to build complex customizations on top of it.