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的原创文章,尽在:"汪子熙":


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