suren-atoyan / monaco-react

Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
https://monaco-react.surenatoyan.com/
MIT License
3.64k stars 260 forks source link

monaco-editor 0.43 loaded in codesandbox when using monaco-react 1.6 #613

Open StefanDBTLabs opened 4 months ago

StefanDBTLabs commented 4 months ago

Describe the bug Unclear if I am doing something wrong but when setting up this codesandbox to use "@monaco-editor/react": "4.6.0" I was confused when I saw the network request for https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs/editor/editor.main.js when clearly monaco-loader says it should be loading 0.46.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/p/sandbox/onvalidate-forked-tsn7s2?file=%2Fpackage.json
  2. see "@monaco-editor/react": "4.6.0" in package.json
  3. inspect network requests
  4. See error editor.main.js 0.43 loaded instead of 0.46

Expected behavior 0.46 should load since that is what is listed in monaco-loader

suren-atoyan commented 4 months ago

Maybe it's conflicting with the monaco editor of codesandbox? Could you please try it in stackblitz?

StefanDBTLabs commented 4 months ago

thanks for the idea to try. I still see 0.43 loaded there: https://stackblitz.com/edit/vitejs-vite-jntzwg?file=src%2FApp.tsx