Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When calling injectStyle the following build error is shown:
Error: Build failed with 1 error:
node_modules/react-toastify/dist/inject-style.esm.mjs:4:4122: ERROR: Expected ";" but found "\";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:\""
This bug was introduced with v10, with v9 injectStyle was working fine. I'm using the standard Vite v5 template.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React: ^18.2.0react-toastify: 10.0.2
Do you want to request a feature or report a bug? Bug
What is the current behavior? When calling
injectStyle
the following build error is shown:This bug was introduced with v10, with v9
injectStyle
was working fine. I'm using the standardVite
v5 template.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
https://stackblitz.com/edit/vitejs-vite-85nrpq?file=src%2FApp.tsx
Edit: The same error is thrown with CRA (only formulated differently): https://codesandbox.io/p/sandbox/infallible-https-v76v6y?file=%2Fsrc%2FApp.js%3A13%2C1
To reproduce:
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? React:
^18.2.0
react-toastify
:10.0.2