jQuery file upload and RequireJS configuration -


i'm trying use jquery file upload, i'm getting stuck requirejs configuration. install our dependencies in /ext/ folder, e.g:

/src   /ext     /jquery-file-upload 

in main.js use following config:

require.config({     paths: {         "ext/jquery-file-upload": "../ext/jquery-file-upload/js/jquery.fileupload"     } }); require([     "ext/jquery-file-upload" ]); 

but requirejs tries load jquery.ui.widget.js root instead of relative file. located in jquery-file-upload directory..

does know i'm doing wrong, or know of working requirejs config jquery file upload?

thanks,

martijn

if @ jquery.fileupload.js file, @ top declares own dependencies

if (typeof define === 'function' && define.amd) {     // register anonymous amd module:     define([         'jquery',         'jquery.ui.widget'     ], factory); 

you need edit require.config path jquery.ui.widget item.

require.config({     paths: {         'jquery.ui.widget': 'your_path_here/jquery.ui.widget'     } });  

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -