spiff-arena
spiff-arena copied to clipboard
refactor off @monaco-editor/react and just use monaco-editor itself
we are currently using
https://www.npmjs.com/package/@monaco-editor/react
which uses
https://www.npmjs.com/package/monaco-editor
We get errors like this in cypress a lot:
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://cdn.jsdelivr.net/npm/[email protected]/min/vs/base/worker/workerMain.js' failed to load.
https://www.npmjs.com/package/@monaco-editor/react aims to be simple, and avoid build processes and whatnot, but they are hardcoding a CDN that apparently doesn't work consistently.
here's apparently how you can integrate the base lib in react:
https://github.com/microsoft/monaco-editor/tree/main/samples/browser-esm-vite-react