Bug #3440 - Switch to RequireJS middleware