How to use the @spartacus/storefront.B2cStorefrontModule.withConfig function in @spartacus/storefront

To help you get started, we’ve selected a few @spartacus/storefront examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / cloud-commerce-spartacus-storefront / projects / storefrontapp / src / app / app.module.ts View on Github external
registerLocaleData(localeDe);
registerLocaleData(localeJa);
registerLocaleData(localeZh);

const devImports = [];

if (!environment.production) {
  devImports.push(StoreDevtoolsModule.instrument());
}

@NgModule({
  imports: [
    BrowserModule.withServerTransition({ appId: 'spartacus-app' }),
    BrowserTransferStateModule,

    B2cStorefrontModule.withConfig({
      backend: {
        occ: {
          baseUrl: environment.occBaseUrl,
          legacy: false,
        },
        oms: {
          baseUrl: environment.occBaseUrl,
        },
      },
      context: {
        urlParameters: ['baseSite', 'language', 'currency'],
        baseSite: [
          'electronics-spa',
          'electronics',
          'apparel-de',
          'apparel-uk',

@spartacus/storefront

Spartacus Storefront is a package that you can include in your application, which allows you to add default storefront features.

Apache-2.0
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis