Razzle with styled components and react-toastify #1783
-
❓QuestionHey guys, I'm facing a problem using styled components and react-toastify. My theme tsx has:
The output of this imported css is:
In my old apps (which don't use razzle) the ReactToastify.css styles are within the <styles data-styled ...> tag. Do you have a clue about how to solve this? Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Need to see your server.js |
Beta Was this translation helpful? Give feedback.
-
Sure... thanks for your quick response. Here is my server.js:
|
Beta Was this translation helpful? Give feedback.
-
Hey, I just changed my server.js and it worked now. Below is working version but I'd like to know if you have something more elegant.
|
Beta Was this translation helpful? Give feedback.
-
Seems right to me, If you need both styled components and regular css. |
Beta Was this translation helpful? Give feedback.
-
How I handle PUBLIC_PATH https://codesandbox.io/embed/boring-kirch-ju2dw?codemirror=1 Set PUBLIC_PATH to / when building and set env vars to point it where you serve it when deployed |
Beta Was this translation helpful? Give feedback.
Hey, I just changed my server.js and it worked now. Below is working version but I'd like to know if you have something more elegant.