Skip to content

Commit dbd76d9

Browse files
committed
Adopt latest loader (which is snapshot-friendly)
1 parent 6831fb4 commit dbd76d9

6 files changed

Lines changed: 225 additions & 204 deletions

File tree

src/vs/code/electron-browser/issue/issueReporter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ function main() {
146146
// In the bundled version the nls plugin is packaged with the loader so the NLS Plugins
147147
// loads as soon as the loader loads. To be able to have pseudo translation
148148
createScript(rootUrl + '/vs/loader.js', function () {
149+
var define = global.define;
150+
global.define = undefined;
149151
define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code
150152

151153
window.MonacoEnvironment = {};

src/vs/code/electron-browser/sharedProcess/sharedProcess.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ function main() {
131131
// In the bundled version the nls plugin is packaged with the loader so the NLS Plugins
132132
// loads as soon as the loader loads. To be able to have pseudo translation
133133
createScript(rootUrl + '/vs/loader.js', function () {
134+
var define = global.define;
135+
global.define = undefined;
134136
define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code
135137

136138
window.MonacoEnvironment = {};

src/vs/css.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var CSSLoaderPlugin;
2020
* Known issue:
2121
* - In IE there is no way to know if the CSS file loaded successfully or not.
2222
*/
23-
var BrowserCSSLoader = (function () {
23+
var BrowserCSSLoader = /** @class */ (function () {
2424
function BrowserCSSLoader() {
2525
this._pendingLoads = 0;
2626
}
@@ -93,7 +93,7 @@ var CSSLoaderPlugin;
9393
return BrowserCSSLoader;
9494
}());
9595
// ------------------------------ Finally, the plugin
96-
var CSSPlugin = (function () {
96+
var CSSPlugin = /** @class */ (function () {
9797
function CSSPlugin() {
9898
this._cssLoader = new BrowserCSSLoader();
9999
}
@@ -110,12 +110,5 @@ var CSSLoaderPlugin;
110110
return CSSPlugin;
111111
}());
112112
CSSLoaderPlugin.CSSPlugin = CSSPlugin;
113-
function init() {
114-
define('vs/css', new CSSPlugin());
115-
}
116-
CSSLoaderPlugin.init = init;
117-
;
118-
if (typeof doNotInitLoader === 'undefined') {
119-
init();
120-
}
113+
define('vs/css', new CSSPlugin());
121114
})(CSSLoaderPlugin || (CSSLoaderPlugin = {}));

0 commit comments

Comments
 (0)