Rewrite all modules as required js modules