Skip to content

Commit

Permalink
fix(monaco): import default language contributions
Browse files Browse the repository at this point in the history
  • Loading branch information
wewoor committed May 20, 2021
1 parent ec61d0f commit 6d0fdbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
5 changes: 5 additions & 0 deletions src/monaco/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import 'monaco-editor/esm/vs/language/typescript/monaco.contribution';
import 'monaco-editor/esm/vs/language/css/monaco.contribution';
import 'monaco-editor/esm/vs/language/json/monaco.contribution';
import 'monaco-editor/esm/vs/language/html/monaco.contribution';
import 'monaco-editor/esm/vs/basic-languages/monaco.contribution';
/**
* This module is overwrite the original monaco-editor/esm/vs/editor/editor.main.js
*/
Expand Down
25 changes: 0 additions & 25 deletions src/monaco/monaco.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,3 @@ if (
],
});
}

(<any>self).MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
switch (label) {
case 'css': {
return './css.worker.js';
}
case 'typescript': {
return './typescript.worker.js';
}
case 'javascript': {
return './javascript.worker.js';
}
case 'html': {
return './html.worker.js';
}
case 'json': {
return './json.worker.js';
}
default: {
return './editor.worker.js';
}
}
},
};

0 comments on commit 6d0fdbc

Please sign in to comment.