jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.38k stars 1.16k forks source link

its dont work with React 16.13.1 and vite #1437

Closed ericky0 closed 1 month ago

ericky0 commented 1 month ago

hi 🖐️, i had a project with webpack (there everything worked normally), then i started to migrate to use vite, and i faced one problem with this library, when i use yarn dev (vite serve) i can normally go to my page that renders this component import { Editor } from 'react-draft-wysiwyg';

image

i can also run yarn build with no problems (vite build --emptyOutDir)

but the problem is: when i run yarn start (serve -s dist) and i go to the page that renders this component, my page is blank and i receive these errors in the console

image

"react": "^16.13.1", "react-draft-wysiwyg": "^1.14.7", "draft-js": "^0.11.7"

ericky0 commented 1 month ago

i managed to solve this problem updating this lib "@vitejs/plugin-react": "^4.2.1"