File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,19 @@ function loadCode() {
259
259
return new Promise ( ( resolve , reject ) => {
260
260
const path = require ( 'path' ) ;
261
261
262
+ // VSCODE_GLOBALS: node_modules
263
+ globalThis . _VSCODE_NODE_MODULES = new Proxy ( Object . create ( null ) , {
264
+ get ( target , mod ) {
265
+ if ( ! target [ mod ] && typeof mod === 'string' ) {
266
+ target [ mod ] = require ( mod ) ;
267
+ }
268
+ return target [ mod ] ;
269
+ }
270
+ } ) ;
271
+ // VSCODE_GLOBALS: package/product.json
272
+ globalThis . _VSCODE_PRODUCT_JSON = require ( '../product.json' ) ;
273
+ globalThis . _VSCODE_PACKAGE_JSON = require ( '../package.json' ) ;
274
+
262
275
delete process . env [ 'ELECTRON_RUN_AS_NODE' ] ; // Keep bootstrap-amd.js from redefining 'fs'.
263
276
264
277
// See https://github.com/microsoft/vscode-remote-release/issues/6543
You can’t perform that action at this time.
0 commit comments