Tailwind-Styled-Component
Tailwind-Styled-Component copied to clipboard
TypeError: default is not a function
![image](https://user-images.githubusercontent.com/33176605/207085664-66daf2dd-2090-4722-95f3-c7d3628a8faf.png)
I'm getting this in vitest jsdom tests. All the tests that import a file that contains a tw component fail with this error, regardless of tw(xxx) or tw.xxx.
@MathiasGilson changing package.json's "main" to .esm solves the problem.
As a temporary fix i aliased the module.
This also helped me make tailwind-styled-components work when using Astro (astro build
)