If your widget requires multiple JavaScript files, then any additional JavaScript files can be loaded through the dependencies in the widget module’s define statement.

To derive the path of the dependency, use the path js/ to reference the widget’s JavaScript folder followed by the path to the dependency but omitting the .js extension. For example, if a widget called myWidget includes the following JavaScript files:

myWidget/
       js/
          file1.js
          file2.js
          file3.js
          myWidget.js

And myWidget.js is the main JavaScript file for the widget and it is dependent on the other three JavaScript files, then the require dependencies in myWidget.js would look like this:

// Dependencies
['js/file1','js/file2','js/file3'],

Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices