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