Closed
Description
We merged #3718 and released the first 2.x alpha, but quickly discovered a few issues:
- Importing SVG from CSS is now broken, you get
[Object object]
in URLs. - While that can be fixed by adding a named export called
toString()
here (which would just return the URL), it looks like the resulting JS bundle contains the React component as soon as CSS imports it. It's my impression that webpack CSS pipeline still relies on CommonJS and therefore can't tree shake the component.
I'm not sure if there's any solution even possible here 😢 We probably need to revert the feature.