You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running a Remix application with the Vite bundler approach. When I trigger a toast, I see the toast content appended to the DOM but it is not displayed on the screen. After taking a deeper look, I realised that the style.css in the Toaster component is not loaded into the page.
I guess this has to do with the requirement of using url imports for css side effects e.g styles.css?url as required by the bundler.
In the meantime I have created a css file containing the values contained in styles.css and imported that manually in my project and it works.
Steps to reproduce the bug 馃攣:
npx create-remix
npm i sonner
Trigger toast after following the setup as described in the documentation
The text was updated successfully, but these errors were encountered:
@edbella I encountered the same in my setup, however only dev is affected. The production build works fine.
For everyone new to remix, you can fix it for your dev setup like this in root.tsx:
importsonnerStylesfrom"~/components/ui/sonner.css?url";// copy this file form this repoexportconstlinks: LinksFunction=()=>[// your other links
...(process.env.NODE_ENV==="development"
? [{rel: "stylesheet",href: sonnerStyles}]
: []),]
Describe the feature / bug 馃摑:
I'm running a Remix application with the Vite bundler approach. When I trigger a toast, I see the toast content appended to the
DOM
but it is not displayed on the screen. After taking a deeper look, I realised that thestyle.css
in theToaster
component is not loaded into the page.I guess this has to do with the requirement of using url imports for css side effects e.g
styles.css?url
as required by the bundler.In the meantime I have created a css file containing the values contained in
styles.css
and imported that manually in my project and it works.Steps to reproduce the bug 馃攣:
The text was updated successfully, but these errors were encountered: