javascript - Uncaught ReferenceError: jQuery is not defined - requireJS -
i have few libraries use jquery
instead of $
. i'm using requirejs load javascript, i'e encountered error message in title. how can tell requirejs allow jquery available under alias jquery
$
?
app.js
require.config({ paths: { app: '../app', "jquery": "lib/jquery/jquery-2.1.4.min", "jqueryui": "lib/jquery-ui.min", "easyloader": "lib/easyui/easyloader", 'domready': 'lib/domready' }, shim: { 'bootstrap': { deps: ['jquery'] }, } }); require(['jquery', 'bootstrap'], function($) { });
adding dependency shim configuration solves this.
'bootstrap-wizard': ['jquery']
Comments
Post a Comment