In the last pull request there was an error (it was: sandbox.require = require). 
Prev pull req. implementation was not able to load js files from ts files. This solution works for js files also.