Closed RobertSandiford closed 2 years ago
Hi @RobertSandiford. I don't disbelieve you but this isn't much to work with. Do you have a minimal example repo that demonstrates the problem?
Hi @agriffis
I suspect I may have mixed up @emotion/styled with styled-components... They both suggest styled
as a moniker.
I set up a quick repo and did get the same error - but this is just the usual mock-ESM style CJS module (esModule = true, with default field) that always leads to this. They are injecting imports via a babel plugin which makes it a bigger issue there.
So, sorry about that!
@RobertSandiford If this was a mixup after all, could you close the issue?
@agriffis done
When using in an ESM environment with import/export, the code fails with '_styled' is not a function.
The import of 'styled-components' loads the .cjs file, which exports an object with the styled function at .default.default