{"action":"created","issue":{"url":"https://api.github.com/repos/vigetlabs/gulp-starter/issues/263","repository_url":"https://api.github.com/repos/vigetlabs/gulp-starter","labels_url":"https://api.github.com/repos/vigetlabs/gulp-starter/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/vigetlabs/gulp-starter/issues/263/comments","events_url":"https://api.github.com/repos/vigetlabs/gulp-starter/issues/263/events","html_url":"https://github.com/vigetlabs/gulp-starter/pull/263","id":144016530,"number":263,"title":"Enables Webpack dev middleware for BrowserSync proxy configs","user":{"login":"mmikkel","id":298510,"avatar_url":"https://avatars.githubusercontent.com/u/298510?v=3","gravatar_id":"","url":"https://api.github.com/users/mmikkel","html_url":"https://github.com/mmikkel","followers_url":"https://api.github.com/users/mmikkel/followers","following_url":"https://api.github.com/users/mmikkel/following{/other_user}","gists_url":"https://api.github.com/users/mmikkel/gists{/gist_id}","starred_url":"https://api.github.com/users/mmikkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmikkel/subscriptions","organizations_url":"https://api.github.com/users/mmikkel/orgs","repos_url":"https://api.github.com/users/mmikkel/repos","events_url":"https://api.github.com/users/mmikkel/events{/privacy}","received_events_url":"https://api.github.com/users/mmikkel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-28T16:16:58Z","updated_at":"2016-03-28T23:55:17Z","closed_at":"2016-03-28T17:04:13Z","pull_request":{"url":"https://api.github.com/repos/vigetlabs/gulp-starter/pulls/263","html_url":"https://github.com/vigetlabs/gulp-starter/pull/263","diff_url":"https://github.com/vigetlabs/gulp-starter/pull/263.diff","patch_url":"https://github.com/vigetlabs/gulp-starter/pull/263.patch"},"body":"Following up on #240: \r\n\r\nCurrently, the `browserSync.js` task will throw an error if BrowserSync is set up using a [proxy host](https://www.browsersync.io/docs/options/#option-proxy), due to the `config.tasks.browserSync.server` variable not being set.\r\n\r\nThis PR fixes this issue and enables dev middleware for proxy configs."},"comment":{"url":"https://api.github.com/repos/vigetlabs/gulp-starter/issues/comments/202632048","html_url":"https://github.com/vigetlabs/gulp-starter/pull/263#issuecomment-202632048","issue_url":"https://api.github.com/repos/vigetlabs/gulp-starter/issues/263","id":202632048,"user":{"login":"mmikkel","id":298510,"avatar_url":"https://avatars.githubusercontent.com/u/298510?v=3","gravatar_id":"","url":"https://api.github.com/users/mmikkel","html_url":"https://github.com/mmikkel","followers_url":"https://api.github.com/users/mmikkel/followers","following_url":"https://api.github.com/users/mmikkel/following{/other_user}","gists_url":"https://api.github.com/users/mmikkel/gists{/gist_id}","starred_url":"https://api.github.com/users/mmikkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmikkel/subscriptions","organizations_url":"https://api.github.com/users/mmikkel/orgs","repos_url":"https://api.github.com/users/mmikkel/repos","events_url":"https://api.github.com/users/mmikkel/events{/privacy}","received_events_url":"https://api.github.com/users/mmikkel/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T23:55:17Z","updated_at":"2016-03-28T23:55:17Z","body":"Figured it out – I had `proxy` set to a string value, where it needs to be an object to work with middleware.\r\n\r\nIn my opinion though, the browserSync.js task should actually handle the above use case, as BrowserSync's `proxy` setting is permitted to be a string, and the end user might not care/know about the middleware option in Gulp Starter, or how that option requires `proxy` to be an object. Currently, it'll just fail, silently. To that end, I revised the browserSync.js task further in order to make middleware work with `proxy` configs regardless of the config format. I'll put up a separate PR for the fix shortly."}}