mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
* add global for node_modules access
* remove most usages of require.__$__nodeRequire * stop using require.nodeRequire
This commit is contained in:
11
src/bootstrap-fork.js
vendored
11
src/bootstrap-fork.js
vendored
@@ -37,6 +37,17 @@ if (process.env['VSCODE_PARENT_PID']) {
|
||||
terminateWhenParentTerminates();
|
||||
}
|
||||
|
||||
// VSCODE_GLOBALS: node_modules
|
||||
globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), {
|
||||
get(target, mod) {
|
||||
if (!target[mod] && typeof mod === 'string') {
|
||||
target[mod] = require(mod);
|
||||
}
|
||||
return target[mod];
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Load AMD entry point
|
||||
require('./bootstrap-amd').load(process.env['VSCODE_AMD_ENTRYPOINT']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user