From ESTK's hidden file 80document.jsx you can see that app.compile() takes 3 arguments.
s = app.compile( this.getText(), ( f ? f.absoluteURI : undefined ), this.includePath );
Not sure what second argument is for, but third argument sets the includePath of the current script which resolves the relative import.
So in generateScriptFile.js file you could use this:
var t = app.compile(s, undefined, fileIn.parent.absoluteURI);
From ESTK's hidden file 80document.jsx you can see that
app.compile()
takes 3 arguments.s = app.compile( this.getText(), ( f ? f.absoluteURI : undefined ), this.includePath );
Not sure what second argument is for, but third argument sets the includePath of the current script which resolves the relative import.
So in generateScriptFile.js file you could use this:
var t = app.compile(s, undefined, fileIn.parent.absoluteURI);
Boom!