sonner icon indicating copy to clipboard operation
sonner copied to clipboard

Include styles.css in dist

Open kevlened opened this issue 1 year ago • 3 comments

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

kevlened avatar Jun 11 '24 17:06 kevlened

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

vercel[bot] avatar Jun 11 '24 17:06 vercel[bot]

Also see https://github.com/emilkowalski/sonner/issues/246

DiederikvandenB avatar Jun 14 '24 11:06 DiederikvandenB

@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

agcty avatar Aug 13 '24 15:08 agcty

Also requesting this @emilkowalski

0x62 avatar Oct 22 '24 20:10 0x62