mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
simplify _VSCODE_NODE_MODULES util
This commit is contained in:
@@ -58,14 +58,7 @@ if (majorRequiredNodeVersion !== currentMajorNodeVersion) {
|
||||
function main() {
|
||||
|
||||
// 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];
|
||||
}
|
||||
});
|
||||
globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), { get: (_target, mod) => require(String(mod)) });
|
||||
|
||||
// VSCODE_GLOBALS: package/product.json
|
||||
globalThis._VSCODE_PRODUCT_JSON = require(`${REPO_ROOT}/product.json`);
|
||||
|
||||
Reference in New Issue
Block a user