AFAIK loopback should not include middleware modules in its dependencies, so that the app does not have to install middleware it does not need. That's to point of using a safe require in the wrapper object, right?