Skip to content

Commit

Permalink
Adopt latest loader (which is snapshot-friendly)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Feb 16, 2018
1 parent 6831fb4 commit dbd76d9
Show file tree
Hide file tree
Showing 6 changed files with 225 additions and 204 deletions.
2 changes: 2 additions & 0 deletions src/vs/code/electron-browser/issue/issueReporter.js
Expand Up @@ -146,6 +146,8 @@ function main() {
// In the bundled version the nls plugin is packaged with the loader so the NLS Plugins
// loads as soon as the loader loads. To be able to have pseudo translation
createScript(rootUrl + '/vs/loader.js', function () {
var define = global.define;
global.define = undefined;
define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code

window.MonacoEnvironment = {};
Expand Down
2 changes: 2 additions & 0 deletions src/vs/code/electron-browser/sharedProcess/sharedProcess.js
Expand Up @@ -131,6 +131,8 @@ function main() {
// In the bundled version the nls plugin is packaged with the loader so the NLS Plugins
// loads as soon as the loader loads. To be able to have pseudo translation
createScript(rootUrl + '/vs/loader.js', function () {
var define = global.define;
global.define = undefined;
define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code

window.MonacoEnvironment = {};
Expand Down
13 changes: 3 additions & 10 deletions src/vs/css.js
Expand Up @@ -20,7 +20,7 @@ var CSSLoaderPlugin;
* Known issue:
* - In IE there is no way to know if the CSS file loaded successfully or not.
*/
var BrowserCSSLoader = (function () {
var BrowserCSSLoader = /** @class */ (function () {
function BrowserCSSLoader() {
this._pendingLoads = 0;
}
Expand Down Expand Up @@ -93,7 +93,7 @@ var CSSLoaderPlugin;
return BrowserCSSLoader;
}());
// ------------------------------ Finally, the plugin
var CSSPlugin = (function () {
var CSSPlugin = /** @class */ (function () {
function CSSPlugin() {
this._cssLoader = new BrowserCSSLoader();
}
Expand All @@ -110,12 +110,5 @@ var CSSLoaderPlugin;
return CSSPlugin;
}());
CSSLoaderPlugin.CSSPlugin = CSSPlugin;
function init() {
define('vs/css', new CSSPlugin());
}
CSSLoaderPlugin.init = init;
;
if (typeof doNotInitLoader === 'undefined') {
init();
}
define('vs/css', new CSSPlugin());
})(CSSLoaderPlugin || (CSSLoaderPlugin = {}));

0 comments on commit dbd76d9

Please sign in to comment.