我正在尝试在我的styled components全局样式中导入tailwind,以设置基础样式。
下面的代码无法正常工作,因此有什么建议可以让它正常工作吗?
import {createGlobalStyle} from 'styled-components';
const GlobalStyle = createGlobalStyle`
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
h1 {
@apply text-2xl;
}
h2 {
@apply text-xl;
}
}
`