BUG: problem with default export / import in some cases
Quick checklist
- I am using the latest version of Snowpack and all plugins.
What package manager are you using?
yarn
What operating system are you using?
macOS
Describe the bug
Possibly related to: #3926
Using all the latest:
- react (18)
- @mui (v5)
- snowpack (3.8.x)
I am unable to actually use any MUI features due to a runtime error where an object is called like a function.
This appears to happen because one of MUIs dependencies (@emotion) is trying to default export the function createCache but somewhere in the process this is messed up and we get createCache = {default: f} rather than the expected createCache = f
I think the @mui and @emotion code looks good, so I am suspecting snowpack or some weird shenanigans here as the culprit. Hoping someone will be more familiar and able to at least give / on this theory.
Steps to reproduce
Clone my minimal example (below) then yarn install && yarn start
You should see the same error...

Link to minimal reproducible example (optional)
https://github.com/oclyke-zucchini/snowpack-mui-emotion-createCache-not-function
Source: FredKSchott/snowpack