Skip to content

Commit 64b9f73

Browse files
committed
bump monaco from 0.22 to 0.33
1 parent 1c3c177 commit 64b9f73

7 files changed

+5787
-7050
lines changed

demo/monaco-demo.js

+18
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ import { WebsocketProvider } from 'y-websocket'
66
import { MonacoBinding } from 'y-monaco'
77
import * as monaco from 'monaco-editor'
88

9+
self.MonacoEnvironment = {
10+
getWorkerUrl: function (moduleId, label) {
11+
if (label === 'json') {
12+
return '/dist/json.worker.bundle.js'
13+
}
14+
if (label === 'css' || label === 'scss' || label === 'less') {
15+
return '/dist/css.worker.bundle.js'
16+
}
17+
if (label === 'html' || label === 'handlebars' || label === 'razor') {
18+
return '/dist/html.worker.bundle.js'
19+
}
20+
if (label === 'typescript' || label === 'javascript') {
21+
return '/dist/ts.worker.bundle.js'
22+
}
23+
return '/dist/editor.worker.bundle.js'
24+
}
25+
}
26+
927
window.addEventListener('load', () => {
1028
const ydoc = new Y.Doc()
1129
const provider = new WebsocketProvider('wss://demos.yjs.dev', 'monaco', ydoc)

0 commit comments

Comments
 (0)