diff --git a/src/bootstrap-window.js b/src/bootstrap-window.js index e4218117b7d..d61e432e3b3 100644 --- a/src/bootstrap-window.js +++ b/src/bootstrap-window.js @@ -115,9 +115,11 @@ // VSCODE_GLOBALS: node_modules globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), { get: (_target, mod) => (require.__$__nodeRequire ?? require)(String(mod)) }); - // VSCODE_GLOBALS: package/product.json - globalThis._VSCODE_PRODUCT_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.json'); - globalThis._VSCODE_PACKAGE_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/package.json'); + if (!safeProcess.sandboxed) { + // VSCODE_GLOBALS: package/product.json + globalThis._VSCODE_PRODUCT_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.json'); + globalThis._VSCODE_PACKAGE_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/package.json'); + } const loaderConfig = { baseUrl: `${bootstrapLib.fileUriFromPath(configuration.appRoot, { isWindows: safeProcess.platform === 'win32', scheme: 'vscode-file', fallbackAuthority: 'vscode-app' })}/out`,