react-draft-wysiwyg
react-draft-wysiwyg copied to clipboard
Global is not defined
In my Electron-React-Typescript-Webpack app I just installed react-draft-wysuwyg
In the renderer I've put:
export default function Funct() {
import { Editor } from "react-draft-wysiwyg";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
return (
<Editor />
)
}
I get this error in the console.log :
Global is not defined
@raphael10-collab did you end up resolving this? If so how?
I face the same issue , any idea on how to fix it , which version should i fallback to ?
Have you found a solution
Add this to your index.html
<script> global = globalThis </script>
https://stackoverflow.com/questions/58936238/uncaught-referenceerror-global-is-not-defined-at-object-node-modules-fbjs-lib
yeah, this fixed it for me. Thanks
Where to add this script
<script> global = globalThis </script>
in laravel with inertiajs(reactjs) ?
Solved : in laravel with inertiajs (reactjs)
add
window.global = window;
to end of file resources/js/bootstrap.js