Dependencies which are AMD-compliant (and Waypoints is) should be require
d via their registered module name. The easiest (only?) way to find out what that name is is to look into the lib's source code:
// (...)
if (typeof define === 'function' && define.amd) {
return define('waypoints', ['jquery'], function($) {
return factory($, root);
});
} // (...)
It's "waypoints
"!
Since the library is AMD-compatibile, you don't need a shim but you'll need to define the path to it (since the file name can be different than the AMD module name):
requirejs.config({
"baseUrl": "theme/PereOlive/js/lib",
"paths": {
"app": "../app",
"waypoints": "path/to/waypoints.min"
}
});
After doing that, you'll need to change you require
call:
define([
"jquery",
"waypoints" // this is the AMD module name
]
Fixed your jsfiddle: http://jsfiddle.net/jVdSk/2/