In previous blogs (importing and tips/tricks), I covered the basics on importing external javascript into your applications. Thanks to some new features, importing is no longer required (pun intended) and working with external Javascript can be referenced using require.js. With this require.js support, you can reference your dependent Javascript files and name the module for use within your Visual Builder applications.
The following requirejs is added to your app flow metadata JSON. The library is reference with a path key followed by a key:value pair that specifies the variable name for the libary followed by the HTTPS path to the libary. NOTE: It must be an HTTPS path, HTTP paths will be rejected by most browsers.
“requirejs”: {
“paths”: {
library”: “https://path.to.library”
}
}
