-
Notifications
You must be signed in to change notification settings - Fork 34.9k
Closed
Labels
*dev-questionVS Code Extension Development QuestionVS Code Extension Development Question
Description
It would be nice to use the node-pty module shipped with vscode in an extension. Currently, I'am doing the following:
//@ts-ignore
const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
const moduleName = path.join(vscode.env.appRoot, "node_modules.asar", "node-pty");
const spawn: typeof import('node-pty').spawn = requireFunc(moduleName).spawn;
It should be possible to create a require interceptor injecting the parrents node-pty
object into the extension.
This is especially nice as there is no general way of loading platform dependent code.
Metadata
Metadata
Assignees
Labels
*dev-questionVS Code Extension Development QuestionVS Code Extension Development Question