Ok, I already know that you should configure paths with RequireJS
like this
require.config({
paths: {
name: 'value'
}
});
And call it like this.
require(['name'], function() {
/* loaded */
});
But the thing is, I'm working in environment in which I don't have access to the existing call to require.config(...)
. For those who care, the environment is Azure Mobile Services scheduled job. Microsoft has already included RequireJS in the environment and configured the paths. My question is two-fold.
1. How do I add paths to the existing require.config()?
I know calling require.config()
again will destroy the existing configuration. Which is what I do not want to do.
2. How do I get to know which paths have already been configured? I really wouldn't like to overwrite any existing path name or overwrite any existing library by accident.