CB-6481 use nodejs module loader to handle hooks