Use RequireJS to Reference Third-Party JavaScript Libraries
If you want to use third-party JavaScript libraries in your App UI, you can import the library and add a requirejs
statement to your App UI's definition.
JS libraries can be imported at the App UI level or at the extension level. For typical usage within an App UI, import your JS library to the resources
directory at the App UI level (extension1/sources/ui/self/applications/<app-ui-id>/resources
). If you want to use external JS libraries with custom web components and fragments, import your JS library to the resources
directory at the extension level (extension1/sources/ui/self/resources/
).