web-apps/vendor/requirejs/tests/mapConfig/plug.js

18 lines
447 B
JavaScript
Raw Normal View History

2016-03-11 00:48:53 +00:00
define({
load: function (name, require, load, config) {
if (!name) {
name = 'main';
} else if (name.charAt(0) === '/') {
name = 'main' + name;
}
//Only grab the first segment of the name.
//This is just to be different, nothing
//that is required behavior.
name = name.split('/').shift();
name = 'plug/' + name;
require([name], load);
}
});