Azure devops extension SDK - define is not a function

Viewed 13

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 :

Uncaught TypeError: define is not a function

I've tried to manually add requestjs/requirejs but it still doesn't work

here is the little code that I use

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <body>
    <div id="root"></div>
    <!-- <script src="./WorkItemFormPage.tsx" type="module"></script> -->
    <script type="module">
      import * as SDK from "azure-devops-extension-sdk";

      SDK.init();
    </script>
  </body>
</html>

If you need more details about the code, feel free to ask!

0 Answers
Related