{"action":"created","issue":{"url":"https://api.github.com/repos/jrburke/requirejs/issues/1323","labels_url":"https://api.github.com/repos/jrburke/requirejs/issues/1323/labels{/name}","comments_url":"https://api.github.com/repos/jrburke/requirejs/issues/1323/comments","events_url":"https://api.github.com/repos/jrburke/requirejs/issues/1323/events","html_url":"https://github.com/jrburke/requirejs/issues/1323","id":67189736,"number":1323,"title":"baseUrl does not use different host","user":{"login":"joseph-jja","id":1828300,"avatar_url":"https://avatars.githubusercontent.com/u/1828300?v=3","gravatar_id":"","url":"https://api.github.com/users/joseph-jja","html_url":"https://github.com/joseph-jja","followers_url":"https://api.github.com/users/joseph-jja/followers","following_url":"https://api.github.com/users/joseph-jja/following{/other_user}","gists_url":"https://api.github.com/users/joseph-jja/gists{/gist_id}","starred_url":"https://api.github.com/users/joseph-jja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseph-jja/subscriptions","organizations_url":"https://api.github.com/users/joseph-jja/orgs","repos_url":"https://api.github.com/users/joseph-jja/repos","events_url":"https://api.github.com/users/joseph-jja/events{/privacy}","received_events_url":"https://api.github.com/users/joseph-jja/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-08T18:26:54Z","updated_at":"2015-04-13T22:28:18Z","closed_at":"2015-04-10T15:22:50Z","body":"Setting baseUrl to an assets host does not serve the assets from that asset host?"},"comment":{"url":"https://api.github.com/repos/jrburke/requirejs/issues/comments/92517391","html_url":"https://github.com/jrburke/requirejs/issues/1323#issuecomment-92517391","issue_url":"https://api.github.com/repos/jrburke/requirejs/issues/1323","id":92517391,"user":{"login":"jrburke","id":73359,"avatar_url":"https://avatars.githubusercontent.com/u/73359?v=3","gravatar_id":"","url":"https://api.github.com/users/jrburke","html_url":"https://github.com/jrburke","followers_url":"https://api.github.com/users/jrburke/followers","following_url":"https://api.github.com/users/jrburke/following{/other_user}","gists_url":"https://api.github.com/users/jrburke/gists{/gist_id}","starred_url":"https://api.github.com/users/jrburke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrburke/subscriptions","organizations_url":"https://api.github.com/users/jrburke/orgs","repos_url":"https://api.github.com/users/jrburke/repos","events_url":"https://api.github.com/users/jrburke/events{/privacy}","received_events_url":"https://api.github.com/users/jrburke/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T22:28:18Z","updated_at":"2015-04-13T22:28:18Z","body":"If modules in optimized_file_with_require_and_config.js trigger loading of modules and they are expected to use baseUrl of 'http://someother.asset.host', then I can see that failing, as the requests for those network loaded dependencies can go out before that require.config call for http://someother.asset.host is called.\r\n\r\nTo avoid that, you can set up a require object with initial config before the script that includes requirejs:\r\n\r\n```html\r\n<script>\r\n  var require = {\r\n    baseUrl: 'http://someother.asset.host'\r\n  };\r\n</script>\r\n<script src=\"optimized_file_with_require_and_config.js\"></script>\r\n\r\n// html html html and then\r\n<script>\r\n  require([\"something/else\"], function(somethingElse) {\r\n\r\n  });\r\n</script>\r\n```\r\n"}}