When importing @emotion/core package editor treats it as a relative dependency and throws an error
🐛 bug report
Description of the problem
How has this issue affected you? What are you trying to accomplish?
I want to use packages that names start with @ sign. When importing namespaced npm package (e.g. @emotion/core) editor treats it as a relative dependency and throws an error:
Could not find module in path: '@emotion/core' relative to '/src/index.js'
Link to sandbox: link
I'm currently looking into this one. I don't think it's treated as a relative dependency, but @emotion has some redirects in its browsers field that don't get followed properly.
Other @ dependencies should still work.
Okey, thank you! My bad, I'll change the title...
Found the issue! It seems like unpkg has no CORS headers for the new @emotion version, so we're not able to fetch missing files. We will use jsdelivr in the meantime. The fix should be live in 10 min.
@CompuIves Amazing! Thank you 🎉
@CompuIves, unfortunately, it breaks the support of packages larger than 50Mb...
This issue is back again 😢
ModuleNotFoundError: Could not find module in path: '@emotion/core' relative to '/node_modules/@emotion/styled-base/dist/styled-base.browser.cjs.js'
I'm deploying now a fallback system, where we first try one service and if it fails we use the other one.