Skip to content

Commit 903fd95

Browse files
committed
chore: remove workers from code-editor
1 parent 214390c commit 903fd95

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/Common/CodeEditor/CodeEditor.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,6 @@ import {
4444
import { CodeEditorReducer, initialState } from './CodeEditor.reducer'
4545
import { MODES } from '../Constants'
4646

47-
self.MonacoEnvironment = {
48-
getWorker(_, label) {
49-
const getWorkerModule = (moduleUrl: string) => {
50-
return new Worker(self.MonacoEnvironment.getWorkerUrl(moduleUrl, label), {
51-
name: label,
52-
type: 'module',
53-
})
54-
}
55-
56-
if (label === MODES.YAML) {
57-
return getWorkerModule('../../yaml.worker.js?worker')
58-
}
59-
60-
return getWorkerModule('/monaco-editor/esm/vs/editor/editor.worker?worker')
61-
},
62-
}
63-
6447
const CodeEditorContext = React.createContext(null)
6548

6649
function useCodeEditorContext() {

0 commit comments

Comments
 (0)