OI-wiki / gatsby-oi-wiki

🚧 基于 Gatsby 的 OI Wiki 渲染框架。🚧
https://next.oi-wiki.org/
Apache License 2.0
66 stars 37 forks source link

取消 CSS 的内联 #313

Open Enter-tainer opened 4 years ago

Enter-tainer commented 4 years ago

目前,在build生成的html中,css类内联在head里面,每一个html都有一份相同的内联格式,这些css无法被缓存,可能存在性能损失。

因此希望能把css单独拿出来。

Enter-tainer commented 4 years ago

https://cssinjs.org/faq/?v=v10.3.0

hirohe commented 3 years ago

https://github.com/mui-org/material-ui/issues/20861

StylesProviderdisableGeneration可以决定是否生成样式

但是这样还需要额外地导入material-ui的样式

ghost commented 2 years ago

any update ?

Enter-tainer commented 2 years ago

pr一直没有合并的原因是该pr并没有完全解决问题,即使加上了那个插件,还有相当一部分css是非内联的

SkyeYoung commented 2 years ago

@stfenjobs 在尝试升级到 MUI v5,可能会解决本问题。

ghost commented 2 years ago

@Enter-tainer @SkyeYoung thank you very much