{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/1703","labels_url":"https://api.github.com/repos/webpack/webpack/issues/1703/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/1703/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/1703/events","html_url":"https://github.com/webpack/webpack/issues/1703","id":120296010,"number":1703,"title":"webpack should support publicPath with different port for testing on mobile devices","user":{"login":"jedwards1211","id":1448194,"avatar_url":"https://avatars.githubusercontent.com/u/1448194?v=3","gravatar_id":"","url":"https://api.github.com/users/jedwards1211","html_url":"https://github.com/jedwards1211","followers_url":"https://api.github.com/users/jedwards1211/followers","following_url":"https://api.github.com/users/jedwards1211/following{/other_user}","gists_url":"https://api.github.com/users/jedwards1211/gists{/gist_id}","starred_url":"https://api.github.com/users/jedwards1211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jedwards1211/subscriptions","organizations_url":"https://api.github.com/users/jedwards1211/orgs","repos_url":"https://api.github.com/users/jedwards1211/repos","events_url":"https://api.github.com/users/jedwards1211/events{/privacy}","received_events_url":"https://api.github.com/users/jedwards1211/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webpack/webpack/labels/enhancement","name":"enhancement","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-03T23:27:05Z","updated_at":"2015-12-07T17:42:35Z","closed_at":null,"body":"It's hard to integrate `webpack-dev-server` with an existing server like Meteor and then load the page on a mobile device connected to my dev machine via LAN.\r\n\r\nThe problem is that while `publicPath: \"http://localhost:8080/\"`  (or `publicPath: \"http://0.0.0.0:8080\"`) works for testing the page on my dev box, they don't work for testing the page on a mobile device.\r\n\r\nIf Webpack simply supported config like this it would solve the problem:\r\n```js\r\noutput: {\r\n  publicPath: \"/\",\r\n  publicPort: 8080,\r\n}\r\n```\r\nMeaning that if I load a resource `doge.png` with `url-loader`, the bundle will request it from `<page base URL>:8080/doge.png` and will load properly on a mobile device."},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/162603926","html_url":"https://github.com/webpack/webpack/issues/1703#issuecomment-162603926","issue_url":"https://api.github.com/repos/webpack/webpack/issues/1703","id":162603926,"user":{"login":"sokra","id":1365881,"avatar_url":"https://avatars.githubusercontent.com/u/1365881?v=3","gravatar_id":"","url":"https://api.github.com/users/sokra","html_url":"https://github.com/sokra","followers_url":"https://api.github.com/users/sokra/followers","following_url":"https://api.github.com/users/sokra/following{/other_user}","gists_url":"https://api.github.com/users/sokra/gists{/gist_id}","starred_url":"https://api.github.com/users/sokra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokra/subscriptions","organizations_url":"https://api.github.com/users/sokra/orgs","repos_url":"https://api.github.com/users/sokra/repos","events_url":"https://api.github.com/users/sokra/events{/privacy}","received_events_url":"https://api.github.com/users/sokra/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T17:42:35Z","updated_at":"2015-12-07T17:42:35Z","body":"``` js\r\noutput: {\r\n  publicPath: \"//\" + require(\"os\").hostname() + \":8080/\"\r\n}\r\n```"}}