Sven Kha Sven Kha - 3 years ago 230
Javascript Question

How does VSCode ensure that all node dependencies are installed for extensions?

I am currently trying to build a pluggable application myself and was wondering how vscode manages the extensions' dependencies. Does it

npm install
in each extension directory and just use those? Or does it have some global scope where each dependency is only loaded once into the runtime and reused?

The reason why I ask is because I want to make the mechanism as fast and efficient as I can currently do.

Answer Source

VS Code loads and runs extensions in a separate process called extension host which is a node.js process. The dependencies from package.json are installed during the packaging of the extension and each extension uses its own copy of the dependencies.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download