Include styles.css in dist
Issue:
Related-to https://github.com/emilkowalski/sonner/issues/386
Granted, this should be seen as a workaround, since the css is already bundled in the js. The root cause of Remix's spotty support for sonner is unclear, but referencing the css directly works for me:
import sonnerStyles from 'sonner/dist/styles.css?url'
export const links: LinksFunction = () => [
{ rel: 'stylesheet', href: sonnerStyles },
]
What has been done:
- [x] Copy the styles.css into the dist folder so it can be referenced by consumers as
sonner/dist/styles.css
Screenshots/Videos:
N/A
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| sonner | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 7, 2024 5:19pm |
Also see https://github.com/emilkowalski/sonner/issues/246
@emilkowalski could you please consider adding the styles to the final bundle? I'm not sure why anyone would be against that honestly, it's a very standard practice to include styles in the final output so the user has control over how to includet hem in their project.
E.g see rainbowkit: https://www.rainbowkit.com/docs/installation#import
Also requesting this @emilkowalski