Closed szimeth-jozef closed 11 months ago
Duplicate of #58 (which shouldn't be closed)
As per the duplicate referenced above, I:
XDM.ts
and SDK.ts
files from here: https://github.com/cnshenj/azure-devops-extension-sdk/tree/cnshenj/esm directly into my project.SDK.ts
by setting line 324 to use instance as any
instead of instance
.import * as SDK from './azure-devops-extension-sdk/SDK'
.It's strange that the MS docs reference the vss-web-extension-sdk
, the vss extension sdk Github page references the azure-devops-extension-sdk
... which then doesn't work with modern build systems. It'd be cool if MS would consider merging or maintaining the ESM version as per cnshenj's PR.
Added multiple module support to the SDK. Please check the latest package: https://www.npmjs.com/package/azure-devops-extension-sdk/v/4.0.0. Note: This is a major version update. You need to update your package.json manually or run npm i azure-devops-extension-sdk@latest
I'm building an Azure Devops extension with Vite and Svelte and I need to import this package somehow, but no success so far. The whole problem seems to be that the SDK package installed via npm is structured as a requirejs AMD library and it doesn't work well with es-modules. So my propose would be, if there is no other option to package the SDK in a similar way as for example @microsoft/signalr does. There's no need to completely change how the SDK is packaged, just to add another way it is transpiled, namely to esm.