fkhadra / react-toastify

React notification made easy 🚀 !
https://fkhadra.github.io/react-toastify/introduction
MIT License
12.33k stars 676 forks source link

toastify is not working via cdn #993

Open quarsee opened 10 months ago

quarsee commented 10 months ago

hey there, first of all your project is awesome! whatever, I am trying to use toastify via cdn but I can't. This is the library which I use: https://unpkg.com/react-toastify@9.1.2-rsc/dist/react-toastify.js The error I get when I try to use the library:

toast.ts:332 Uncaught ReferenceError: require is not defined
    at toast.ts:332:10
(anonymous) @ toast.ts:332
quarsee commented 10 months ago

by the way there are different errors in diffrent versions. I used directly js there (mb I was confused) but in older versions(8.0.0 & 8.2.0) when I try to use library from production.min.js I am facing with:

Uncaught ReferenceError: exports is not defined
    at react-toastify.cjs.production.min.js:1:106
(anonymous) @ react-toastify.cjs.production.min.js:1
quarsee commented 10 months ago

Also in 9.1.3:

Transitions.tsx:11 Uncaught TypeError: Cannot read properties of undefined (reading 'forwardRef')
    at Transitions.tsx:11:39
    at react-toastify.umd.js:1:188
    at react-toastify.umd.js:1:233