Closed abentkamp closed 3 months ago
Can you please provide a full reproduction repo?
I've just tried your exact code without issue, so I see only one possible reason: your bundler is for some reason duplicating some code (due to deps optimization or something) what do you use?
Sorry for being so slow to respond. I am using vite. I will attempt to set up a reproduction repo, maybe I can eliminate the code duplication on the way.
Thanks a lot! I guess I had two versions of vscode
in the project because I also had npm install
ed the VSCode extension I'd like to use.
Here is a minimal example of what I am attempting:
Accessing
workspace
on the last line yields:What am I doing wrong?
I understand that I can call
const vscode = await getApi()
on the result ofregisterExtension
and then usevscode.workspace
instead ofworkspace
. However, I would like to reuse code from an existing VSCode extension, which will just callworkspace
.