Load loader.js via a <script> tag

This commit is contained in:
Alex Dima
2020-06-24 17:19:11 +02:00
parent 118e9126bb
commit 4deff1a75b
8 changed files with 42 additions and 22 deletions

View File

@@ -11,7 +11,12 @@
Shared Process
</body>
<!-- Init Bootstrap Helpers -->
<script src="../../../../bootstrap.js"></script>
<script src="../../../../vs/loader.js"></script>
<script src="../../../../bootstrap-window.js"></script>
<!-- Startup via sharedProcess.js -->
<script src="sharedProcess.js"></script>
</html>
</html>

View File

@@ -6,8 +6,21 @@
//@ts-check
'use strict';
const bootstrap = require('../../../../bootstrap');
const bootstrapWindow = require('../../../../bootstrap-window');
/**
* @type {{ load: (modules: string[], resultCallback: (result, configuration: object) => any, options?: object) => unknown }}
*/
const bootstrapWindow = (() => {
// @ts-ignore (defined in bootstrap-window.js)
return window.MonacoBootstrapWindow;
})();
/**
* @type {{ avoidMonkeyPatchFromAppInsights: () => void; }}
*/
const bootstrap = (() => {
// @ts-ignore (defined in bootstrap.js)
return window.MonacoBootstrap;
})();
// Avoid Monkey Patches from Application Insights
bootstrap.avoidMonkeyPatchFromAppInsights();