Open hixuanxuan opened 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.88%. Comparing base (
907a22b
) to head (594a29c
).:exclamation: Current head 594a29c differs from pull request most recent head d2c6e42. Consider uploading reports for the commit d2c6e42 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
问题
在SSR场景
ssrInine={true}
导致重复的组件样式会被多次抽取打进html,导致文档的体积增大,nextjs里面无法直接使用rendertostring/renderToNodeStream
解决
利用记录次数,在服务端对于在cache中相同key对应的样式,只插入文档一次,并且利用react生命周期传递cache对象,不能使用defaultCache(次数是node的全局累计)
使用