Posted 24 July 2019, 5:55 am EST
Hello I am trying to get wijmo to work, but struggle really hard with it! I can’t find up-to-date info on how to use it with Visual Studio, Typescript (and Knockout, maybe requireJS). The docs only cover using wijmo with angular, react and the like.
I downloaded wijmo-5.20192.624
The readme in it says the zip file contains 3 folders: Dist, Samples & VsTemplates. Mine contains 4 folders: Dist, Intellisense, NpmImages & Samples. VsTemplates is missing. Either the readme is outdated or the build in the download is wrong. Maybe the Vs folder could have helped me, but its no big deal.
Since I am not using any of your common frameworks, I tried using the most neutral tutorial I found: https://www.grapecity.com/wijmo/docs/GettingStarted/QuickStart/QuickStart-PureJS
My project is using asp.net core 2 and typescript. Typescript is set to target ES5 and use AMD modules, which is why I use requireJS.
Sadly wijmo does not seem to work with typescript/requrieJS. I always get an error. Some errors I got in the past:
SyntaxError: import declarations may only appear at top level of a module (es5-esm.js:14:365)
ReferenceError: exports is not defined (index.js:14:379)
wijmo is undefined
As far as I know wijmo5 is written in typescript, so I wonder why the typescript support does not work or is so complicated to get to work.
I had already posted on Stackoverflow 2 days ago, but nobody was able to help me yet: https://stackoverflow.com/questions/57149008/syntaxerror-using-wijmo-with-requirejs-typescript/57151704?noredirect=1#comment100847890_57151704
Please help! I hope you guys, could give me some tips, on how to get wijmo to work in a typescript environment within visual studio.
P.S.: The recaptcha is really annoying! The worst kind of captcha there is. I wonder why everbody uses it? Its really frustrating and I’d recommend getting rid of it!