自服务器启动以来,每次都会在渲染时<style data-styled-components="...">...</style>
的末尾添加新的CSS类。但是,当新类生成时,它们不会在页面重新加载后被删除(但是旧类变得无用)。
我想这是因为所有类都保留在内存中。 有办法避免这种情况吗?
以下是显示它堆叠过多的图像:
我试图更改样式组件包的版本,以配置babel-plugin-styled-components
/ typescript-plugin-styled-components
,但没有任何帮助。