Use insertRequire with requires optimiser

This way the generated index.html can be slightly simpler