Turns out the issue was related to hosts file. Requirejs was throwing timeout because localhost was taking too long to resolve. Everything works fine after updating hosts file to this:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost.localdomain
127.0.0.1 localhost
127.0.0.1 username.lmuk.local
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
More information available here.