Open yourchoice opened 6 years ago
I can see how this would be useful but you can already do this by prefixing the paths yourself (you can also use a before
callback function). I'm curious to see how many other people have this problem. Unless it's a common issue, my preference is for keeping the LoadJS feature set to an absolute minimum.
I say in idea if there are many files to load in same path to reduce the code:
loadjs(['foo.js', 'bar.js'], 'foobar', { 'path_prefix': '/path/to/' });
If you'd like to start doing this now you can use the before
callback:
loadjs(['foo.js', 'bar.js'], 'foobar', {
before: function(path, scriptEl) {scriptEl.src = '/path/to/' + path;}
});
Add .path() method like on $script.path()