Widget Checker question

1
Hi, within my define function of my widget I include a remote javascript file, example: "https://www.urlexample.com/testscript.js" The widget checker flags this as an error as the following: https: - Syntax error illegal token my widget works fine locally but this prevents us from building our application. My question is should we not be adding remote js via the define or how should I be doing this instead? Thank you.
asked
2 answers
2

Unfortunately this is not possible at the moment, we had a similar issue with the Google Maps Widget, where we wanted to have the widget get the Google JSAPI and load Maps through the loader. The reason this cannot be done at the moment is the way the modeler works:

  • When you run it locally, it will load all dependencies separately. Require allows for inclusion of remote files and so it works.
  • When you deploy, the modeler takes all dependencies, packs it and creates one single Javascript file. So including a remote file will fail, that's why the Widget Checker will give you an error.

The suggestion of Marcel on the Q4 idea topic would be great to have.

answered
2

The widget checker does not approve of this. I added a topic to the Q4 idea topic

answered