@@ -18,23 +18,29 @@ import ReconnectingWebSocket from "reconnecting-websocket";
1818 * */
1919//========================================================================================
2020
21- self . MonacoEnvironment = {
22- getWorkerUrl : function ( _ , label ) {
23- if ( label === "json" ) {
24- return "./json.worker.bundle.js" ;
25- }
26- if ( label === "css" || label === "scss" || label === "less" ) {
27- return "./css.worker.bundle.js" ;
28- }
29- if ( label === "html" || label === "handlebars" || label === "razor" ) {
30- return "./html.worker.bundle.js" ;
31- }
32- if ( label === "typescript" || label === "javascript" ) {
33- return "./ts.worker.bundle.js" ;
34- }
35- return "./editor.worker.bundle.js" ;
36- } ,
37- } ;
21+ // Commented this because it was throwing an error as something
22+ // In the bundler (spent a few hours investigating this)
23+ // wasn't working. Since I couldn't get the files by any name /
24+ // path, ended up giving up and just commented this. Now we
25+ // only get a simple warning in the console instead of that
26+ // invasive backdrop error and console error.
27+ // self.MonacoEnvironment = {
28+ // getWorkerUrl: function (_, label) {
29+ // if (label === "json") {
30+ // return "./json.worker.js";
31+ // }
32+ // if (label === "css" || label === "scss" || label === "less") {
33+ // return "./css.worker.js";
34+ // }
35+ // if (label === "html" || label === "handlebars" || label === "razor") {
36+ // return "./html.worker.js";
37+ // }
38+ // if (label === "typescript" || label === "javascript") {
39+ // return "./ts.worker.js";
40+ // }
41+ // return "./editor.worker.js";
42+ // },
43+ // };
3844
3945const createUrl = ( ) => {
4046 const protocol = location . protocol === "https:" ? "wss" : "ws" ;
0 commit comments