-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
How to use version 3.3.0 (pure ESM)? #336
Comments
After further investigation I found out the cause is in webpack or babel, when compiling, it imports this ESM library the way mentioned above (and therefore it mixes ESM with CJS):
Please let me this issue opened, if anyone would know how to solve this, I am convinced I am not the last person in the world who is struggling with this. |
After some investigation I have found that it was probably caused by commit 410cd67 and thus it affects versions >=3.2.0. In my case it could be fixed by reverting all packages to version 3.1.2 or 3.1.0 by settings dependecies in package.json and using yarn resolutions: {
"dependencies": {
"@xstyled/core": "3.1.2",
"@xstyled/emotion": "3.1.2",
"@xstyled/system": "3.1.2",
"@xstyled/util": "3.1.0"
},
"resolutions": {
"**/@xstyled/core": "3.1.2",
"**/@xstyled/system": "3.1.2",
"**/@xstyled/util": "3.1.0"
}
} |
@AlfonzAlfonz Thank you for this workaround, I spent a long time stuck on this issue. The resolutions piece is what I was missing 👍 |
I came across this issue, thanks @AlfonzAlfonz , I was able to make it work like this:
|
Thanks for the suggestion @AlfonzAlfonz, managed to fix it without resolutions, so just like this:
Glad i can fix a whole lot of projects now with this, hopefully this won't be an issue in versions above 3.3.0. |
We seem to be experiencing the same issue on v3.5.1 - the workaround given by @franzrecinos worked for us |
That's very weird, everything should be fixed now. |
I am using razzle project or create-react-app for my projects.
On both I am now as of 3.3.0 getting error like:
To put
"type": "module"
does not work and I think that even does not make right sense.How to best deal with this?
The text was updated successfully, but these errors were encountered: