Closed Shadowner closed 1 year ago
Are you using any build tools? I'm using Vite and had to manually include require.js. Seems to have something to do with what Vite calls Dependency Pre-Bundling. Not entirely satisfied though as I still don't quite understand why this happens.
Doesn't seem to have worked after all, still digging into this.
Ok, so as it turns out this was because the library is built as an AMD module, which Vite does not natively support. For my use case I ended up making use of the code from @cnshenj in their pull request so I can use it as an ES module.
If any of the maintainers read this, please merge this pull request as it seems like no brainer in 2022 to use ES modules.
Totally what I also saw, it's been a while and totally forgot this issues, thank's for your time !
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 trying to develop an extension for Azure DevOps. But whenever I try to use the SDK it pop an error in the console :
I've tried to manually add
requestjs
/requirejs
but it still doesn't workhere is the little code that I use
If you need more details about the code, feel free to ask!