I understood how I can config in requireJS a fallback for a single file like this:
var skin = "christmas";
requirejs.config({
paths: {
languagesLocal : [
BaseUrl + skin + '/js/languagesLocal',
BaseUrl + "default" + '/js/languagesLocal'
]
}
});
so incase there is no "chrismas" skin I land to the default script.
Now - my question is - How do I make a complete folder to be the fallback folder? so incase one file does not exist in the skin folder - it will have a fallback in another folder. I need that each file will be checked if it exist and if not it should have a fallback in the default folder
I tried to do it with baseUrl
:
var skin = "christmas";
requirejs.config({
baseUrl: [
BaseUrl + skin + '/js/',
BaseUrl + 'default' + '/js/'
],
});
but it fails and render the baseUrl as one huge URL combined with the 2 strings.