MathiasGilson / Tailwind-Styled-Component

Create Tailwind CSS React components like styled components with class names on multiple lines and conditional class rendering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: default is not a function

alexjidras opened this issue · comments

image

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.
image

This also helped me make tailwind-styled-components work when using Astro (astro build)