File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import FontFaceObserver from 'fontfaceobserver' ;
33
4+ import loaderBootstrap from 'app/vscode/dev-bootstrap' ;
5+
46function noop ( ) { }
57
68class MonacoEditor extends React . PureComponent {
@@ -34,9 +36,7 @@ class MonacoEditor extends React.PureComponent {
3436 return ;
3537 }
3638
37- context
38- . require ( 'app/vscode/dev-bootstrap' )
39- . default ( [ 'vs/editor/editor.main' ] ) ( ( ) => {
39+ loaderBootstrap ( [ 'vs/editor/editor.main' ] ) ( ( ) => {
4040 this . initMonaco ( ) ;
4141 } ) ;
4242 } ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import FontFaceObserver from 'fontfaceobserver' ;
33
44import controller from 'app/controller' ;
5+ import loaderBootstrap from 'app/vscode/dev-bootstrap' ;
56import './icon-theme.css' ;
67import './workbench-theme.css' ;
78
@@ -39,9 +40,7 @@ class MonacoEditor extends React.PureComponent {
3940 } ;
4041
4142 afterViewInit = ( ) => {
42- window
43- . require ( 'app/vscode/dev-bootstrap' )
44- . default ( [ 'vs/editor/codesandbox.editor.main' ] ) ( ( ) => {
43+ loaderBootstrap ( [ 'vs/editor/codesandbox.editor.main' ] ) ( ( ) => {
4544 this . initMonaco ( ) ;
4645 } ) ;
4746 } ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import requirePolyfills from 'common/load-dynamic-polyfills';
1414import 'normalize.css' ;
1515import 'common/global.css' ;
1616import theme from 'common/theme' ;
17+ import loaderBootstrap from 'app/vscode/dev-bootstrap' ;
1718
1819import controller from './controller' ;
1920import App from './pages/index' ;
@@ -160,9 +161,7 @@ window.BrowserFS.configure(
160161 throw e ;
161162 }
162163
163- window
164- . require ( 'app/vscode/dev-bootstrap' )
165- . default ( [ 'vs/editor/editor.main' ] ) ( ( ) => {
164+ loaderBootstrap ( [ 'vs/editor/editor.main' ] ) ( ( ) => {
166165 if ( localStorage . getItem ( 'settings.experimentVSCode' ) === 'true' ) {
167166 window . require ( [ 'vs/editor/codesandbox.editor.main' ] , ( ) => {
168167 boot ( ) ;
You can’t perform that action at this time.
0 commit comments