Select to view content in your preferred language

Add external libraries in WAB Portal version

348
0
08-19-2020 12:43 PM
TyroneLigon1
Regular Contributor

I'm using WAB DE to develop a custom widget. I added jQuery 3.5.1 and jQuery UI 1.12 to the webappviewer/libs/jquery folder, and I reference the libraries as such in my widget:

define(

   ...

   'jimu/loaderplugins/jquery-loader!libs/jquery/jquery-3.5.1.min, libs/jquery/jquery-ui.min.js'

   ...

function (..., $)

Works just fine. Copied the widget folder to our server instance of WAB into webappviewer/widgets, and copied the jQuery libraries into webappviewer/libs/jquery. Registered the widget in the portal as an application extension, created a web app, added the custom widget to the app, launched the app, then opened the widget.

I get a 404 error when the widget tries to load the jQuery libraries, although the displayed path in the browser console matches the physical library location.

Do I have to add the libraries to the init.js resource array?

0 Kudos
0 Replies