SAP

SAP Spartacus central configurat

2021-01-22  本文已影响0人  _扫地僧_

这个central config的源代码:

import {
  AnonymousConsentsConfig,
  AsmConfig,
  AuthConfig,
  CartConfig,
  CmsConfig,
  ExternalRoutesConfig,
  GlobalMessageConfig,
  I18nConfig,
  KymaConfig,
  OccConfig,
  PersonalizationConfig,
  RoutingConfig,
  SiteContextConfig,
  StateConfig,
  StoreFinderConfig,
} from '@spartacus/core';
import { CheckoutConfig } from './cms-components/checkout/config/checkout-config';
import { IconConfig } from './cms-components/misc/icon/icon.model';
import { QualtricsConfig } from './cms-components/misc/qualtrics/config/qualtrics-config';
import { PWAModuleConfig } from './cms-structure/pwa/pwa.module-config';
import { FeatureToggles } from './feature-toggles';
import { SkipLinkConfig } from './layout/a11y/skip-link/config/index';
import { LayoutConfig } from './layout/config/layout-config';
import { DirectionConfig } from './layout/direction/config/direction.config';
import { PaginationConfig } from './shared/components/list-navigation/pagination/index';
import { MediaConfig } from './shared/components/media/media.config';
import { ViewConfig } from './shared/config/view-config';

export type StorefrontConfig =
  | AnonymousConsentsConfig
  | AuthConfig
  | CmsConfig
  | OccConfig
  | QualtricsConfig
  | StateConfig
  | PWAModuleConfig
  | SiteContextConfig
  | LayoutConfig
  | DirectionConfig
  | MediaConfig
  | RoutingConfig
  | I18nConfig
  | PersonalizationConfig
  | IconConfig
  | CheckoutConfig
  | KymaConfig
  | GlobalMessageConfig
  | ExternalRoutesConfig
  | ViewConfig
  | FeatureToggles
  | AsmConfig
  | SkipLinkConfig
  | PaginationConfig
  | StoreFinderConfig
  | CartConfig;

在b2c-storefront-module.ts文件里加入下面这段log语句:

通过分析调用栈的上下文,能得到很多有用信息,比如Spartacus base site的设置:


上一篇下一篇

猜你喜欢

热点阅读