web-apps/vendor/requirejs/tests/mapConfig/plug.js
Maxim Kadushkin 741b10515d webapps added
2016-03-10 21:48:53 -03:00

18 lines
447 B
JavaScript

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);
}
});