Client use require js

I'd like to discus this change as it is a big one with implications.