Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: default is not a function #83

Open
alexjidras opened this issue Dec 12, 2022 · 2 comments
Open

TypeError: default is not a function #83

alexjidras opened this issue Dec 12, 2022 · 2 comments

Comments

@alexjidras
Copy link

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.

@alexjidras
Copy link
Author

@MathiasGilson changing package.json's "main" to .esm solves the problem.

As a temporary fix i aliased the module.
image

@Kadrian
Copy link

Kadrian commented Feb 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants