microsoft/live-share

`vsls.getAPI()` returns `null` if extension is bundled

Opened this issue · 1 comments

Dear VSLS devs,

Describe what happened:

I was trying to add support for Live Share to the coq-lsp extension, however I am finding some puzzling error: basically, if I bundle my extension with WebPack or esbuild, vsls.getAPI() will always resolve to null.

If instead, I chose not to bundle the extension, things seem to work.

Is that a known problem? Let me know if you need more information, including a fully reproducible setup (the trivial extension that calls getAPI suffices)

What was your system configuration?

Product and Version [VS/VSCode]: VSCode 1.88.0
OS Version[macOS/Windows]: Linux (Ubuntu 22.04)
Live Share Extension Version: v1.0.5918
Target Platform or Language [e.g. Node.js]: VSCode Extensions

Steps to Reproduce / Scenario:

  1. Write a simple extension that calls vsls.getAPI()
  2. Build with tsc -b . , vsls.getAPI() works
  3. Build with a bundler (tried esbuild 0.16, 0.20, webpack), vsls.getAPI() returns null