Closed pantharshit007 closed 3 months ago
JUST ADD THIS LINE IN YOUR vite.config.js
file
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
define: {
global: "globalThis",
}
})
this is the important part
define: {
global: "globalThis",
}
SOURCE: here https://github.com/react-simple-code-editor/react-simple-code-editor/issues/86
This issue is resolved
Describe the bug I got an error like the one mention in the screenshot below in the react VITE project. I did exactly the same steps that are mentioned in the official npm site.
here global is deprecated and we need to use globalThis instead
Screenshots
SOLUTION IS IN THE BELOW COMMENT UNLIKE ISSUE #552