Found the issue. In my require.config, I added the port number 443 with https in the base url. The module requirejs\text checks for Xhr and compares the port number, the url and the protocol with the one returned from the browser. Since the browser automatically removes this port when using https, 443 did not match with undefined, and it was considered cross-site. I simply removed the port in my baseUrl, and everything is now working.