I'm using Visual Studio 2015RC + Cordova CLI 5.1.1 + TypeScript + RequireJS + jQuery .
I'd like to change the location of my jquery.js file from the scripts
folder to scripts/lib
. I added a requirejs.config and changed the jQuery location.
requirejs.config({
baseUrl: 'scripts/lib',
paths: {
jquery: 'jquery'
}
});
Unfortunately, when I debug using Ripple I get the following error.
Exception occurred
Message: Exception: Script error for: jquery
http://requirejs.org/docs/errors.html#scripterror
I'm not sure if this is a problem with RequireJS and jQuery or VS2015RC + Cordova.
The error is that
jquery
isn't resolving to thejquery.js
file (an HTTP 404 error). Check the HTTP Get request made by the browser. It will be something likehttp://yourapp/scripts/lib/jquery.js
. Make this GET call yourself (open the link in your browser. And based on that fix the config to the correct path to jquery.js file.