我希望能够使用@emotion/styled来生成带有样式的react组件。我们使用rollup作为我们的包生成器,它可以从typescript转换为esm和commonjs。当我运行构建时,我得到了以下错误:Error: 'default' is not exported by node_modules\@emotion\memoize\dist\memoize.cjs.jsnode_modules\@emotion\is-prop-valid\dist\is-prop-valid.esm.js (1:7)
color: red;`; 然后我得到这个错误:Component selectors can only be used in conjunction with babel-plugin-emotion我似乎不能修复它--在情感资源库上看到了类似的问题,但那里的解决方案似乎不起作用,已经尝试过@emotion/styled/macro,但没有运气。 也许应该提一下,我也在使用情绪主题化。transform-inline-environment-variables", "incl
我使用@emotion/react主题化和注入主题到它,我能够访问主题使用useTheme到组件,但不能访问主题到样式使用@emotion/styled。有什么需要帮忙的吗?//libsimport styled from '@emotion/styled';
import StylesProvider from '@mui/styles/StylesProvide