Fail/Test Case
Use this project structure.
Resources/app.js
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#000',
exitOnClose: true
});
Ti.include("sub/sub.js");
win.add(Ti.UI.createLabel({
top: "20dp", left: "20dp", right: "20dp", height: "40dp", color: "white",
text: rootmod.sayHi("from a module in /.")
}));
win.open();
Resources/rootmod.js
exports.sayHi = function(s) {return "Hello, " + s ; };
Resources/sub/sub.js
var rootmod = require("/rootmod");
Run that app and it will tell you that the module can't be found. (Or, if you're testing the fix, it should put a label that says "Hello, from a module in /".)
Marshall's huge TIMOB-6073 will likely fix this. Wait on it.
Marshall's TIMOB-6073 will fix this.
Oh, did I mention Marshall's TIMOB-6073 will fix this?
Tested with v8/rhino on Xoom: 3.2.1 LG Exp: 2.2.2 Droid 3: 2.3.4