Connect middleware for RequireJS compiling