Hello,
I am currently developing a custom widget with the 4.21 JavaScript API with TypeScript. I am having an issue importing it into the _Layout.cshtml of my .NET Application. I put the widget directory within the custom script directory of my .NET app and compiled it according to the instructions, however, my application cannot find the script at runtime which crashes all the ESRI components of my app. Here is my index.html within the widget directory.
Does this work outside .NET environment? I haven't used .NET to build web apps in years, it could be a file copy issue, not sure.
Rene,
Thanks for your response! I have not tried it yet.
I did some changes to my code but now I am running into a browser issue wherein I cannot access local resources within the project directory. I tried hosting it on an http-server, but I get a multiple define error with Dojo.
Rene,
I installed the @types/arcgis-js-api and I have gotten the application to read the widget script, however, I am having issues with an Uncaught Reference Error: require is not defined -- which I tried to solve by switching the module setting in tsconfig to commonjs but to no avail. I am wondering what I need to add or change in my settings to get the application to be able to read my script. I also added numerous C#/NuGet packages to the main application like requirejs to try and solve the issue, but nothing seems to be working. Is there anything you can recommend?
Thanks!