File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed
packages/demo/demo-v2/src/pages/index Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change 2323 < script >
2424 require . config ( { paths : { 'vs' : '//lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.30.0/min/vs/' } } ) ;
2525
26- // try {
27- // // https://github.com/microsoft/monaco-editor/blob/master/docs/integrate-amd-cross.md
28- // window.MonacoEnvironment = {
29- // getWorkerUrl: function(workerId, label) {
30- // const code = encodeURIComponent(`
31- // self.MonacoEnvironment = {
32- // baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20 .0/min/'
33- // };
34- // importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.20 .0/min/vs/base/worker/workerMain.js');
35- // `);
36- //
37- // return 'data:text/javascript;charset=utf-8,' + code;
38- // }
39- // };
40- // } catch (e) {
41- // // nothing ....
42- // }
26+ try {
27+ // https://github.com/microsoft/monaco-editor/blob/master/docs/integrate-amd-cross.md
28+ window . MonacoEnvironment = {
29+ getWorkerUrl : function ( workerId , label ) {
30+ const code = encodeURIComponent ( `
31+ self.MonacoEnvironment = {
32+ baseUrl: 'https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.30 .0/min/'
33+ };
34+ importScripts('https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/monaco-editor/0.30 .0/min/vs/base/worker/workerMain.js');
35+ ` ) ;
36+
37+ return 'data:text/javascript;charset=utf-8,' + code ;
38+ }
39+ } ;
40+ } catch ( e ) {
41+ // nothing ....
42+ }
4343 </ script >
4444</ body >
4545</ html >
You can’t perform that action at this time.
0 commit comments