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

custom-file-input:lang(en)~.custom-file-label -> unmatched pseudo-class :lang

原因:混合導致的一些問題:默認 Bootstrap 4.3.1 樣式 + Angular 12.0 中引入的默認 CSS 優化器
解決方法:從 spartacus 中刪除所有樣式 → 從 angular.json 中爲 storefrontapp 刪除整個數組“樣式”:[ ........... ]

如下圖所示:

問題2:

Unable to locate stylesheet https:/use.fontawesome.com/releases/v5.8.1/css/all.css

原因: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} ] } })

更多Jerry的原創文章,盡在:"汪子熙":


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章