根据@摩纳哥编辑器/react的文档,我们需要原始摩纳哥编辑器作为对等依赖。我将其安装为一个dev依赖项,并试图将node_modules/monaco-editor/monaco.d.ts添加到include块中的tsconfig.json中。import * as monaco from 'monaco-editor/esm/vs/editor/editor.api
所以我现在正在尝试用这个包来设置Monaco编辑器:https://github.com/egoist/vue-monaco 它运行得很好,除了一条错误消息: Could not create webPlease see https://github.com/Microsoft/monaco-editor#faq
You must define a function MonacoEnvironment.getWorkerUrl