天天看點

SAP Spartacus 4.0 關于SSR CSS 處理邏輯的一些 warning 消息的處理

SAP Spartacus 4.0 關于SSR CSS 處理邏輯的一些 warning 消息的處理

原因:混合導緻的一些問題:預設 Bootstrap 4.3.1 樣式 + Angular 12.0 中引入的預設 CSS 優化器

解決方法:從 spartacus 中删除所有樣式 → 從 angular.json 中為 storefrontapp 删除整個數組“樣式”:[ … ]

如下圖所示:

SAP Spartacus 4.0 關于SSR CSS 處理邏輯的一些 warning 消息的處理

問題2:

provideConfig({ icon: {resources: [ {type: IconResourceType.TEXT} ] } })
      
SAP Spartacus 4.0 關于SSR CSS 處理邏輯的一些 warning 消息的處理

原因:the URL

https://use.fontawesome.com/releases/v5.8.1/css/all.css

defined in the default fontawesomeIconConfig in the storefront lib is not handled properly/

解決方法:覆寫此配置 → 在 app.module 中提供:

provideConfig({ icon: {resources: [ {type: IconResourceType.TEXT} ] } })