Skip to content

Commit

Permalink
Fix monaco-editor-webpack-plugin example
Browse files Browse the repository at this point in the history
  • Loading branch information
remcohaszing committed Aug 25, 2023
1 parent 77a8a9f commit 2a9883e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions examples/monaco-editor-webpack-plugin/src/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
import * as monaco from 'monaco-editor'
import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker'
import { configureMonacoYaml } from 'monaco-yaml'
import YamlWorker from 'monaco-yaml/yaml.worker?worker'

window.MonacoEnvironment = {
getWorker(moduleId, label) {
switch (label) {
case 'editorWorkerService':
return new EditorWorker()
case 'yaml':
return new YamlWorker()
default:
throw new Error(`Unknown label ${label}`)
}
}
}

configureMonacoYaml(monaco, {
enableSchemaRequest: true,
Expand Down

0 comments on commit 2a9883e

Please sign in to comment.