{"action":"opened","issue":{"url":"https://api.github.com/repos/shama/webpack-stream/issues/119","repository_url":"https://api.github.com/repos/shama/webpack-stream","labels_url":"https://api.github.com/repos/shama/webpack-stream/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/shama/webpack-stream/issues/119/comments","events_url":"https://api.github.com/repos/shama/webpack-stream/issues/119/events","html_url":"https://github.com/shama/webpack-stream/issues/119","id":157632193,"number":119,"title":"BrowserSync not starting when watch: true","user":{"login":"ivancuric","id":2827047,"avatar_url":"https://avatars.githubusercontent.com/u/2827047?v=3","gravatar_id":"","url":"https://api.github.com/users/ivancuric","html_url":"https://github.com/ivancuric","followers_url":"https://api.github.com/users/ivancuric/followers","following_url":"https://api.github.com/users/ivancuric/following{/other_user}","gists_url":"https://api.github.com/users/ivancuric/gists{/gist_id}","starred_url":"https://api.github.com/users/ivancuric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivancuric/subscriptions","organizations_url":"https://api.github.com/users/ivancuric/orgs","repos_url":"https://api.github.com/users/ivancuric/repos","events_url":"https://api.github.com/users/ivancuric/events{/privacy}","received_events_url":"https://api.github.com/users/ivancuric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-31T09:50:53Z","updated_at":"2016-05-31T09:50:53Z","closed_at":null,"body":"If I have `watch: true` enabled in the webpack config, BrowserSync won't start for some reason. Note, I don't have watching enabled in gulp.\r\n\r\nJS task:\r\n```\r\ngulp.task('js', () => {\r\n  return gulp.src('')\r\n    .pipe(plumber())\r\n    .pipe(webpack(webpackConfig))\r\n    .on('error', notify.onError({\r\n      message: (error) => {\r\n        return error.message;\r\n      }\r\n    }))\r\n    .pipe(sourcemaps.init({loadMaps: true}))\r\n    .pipe(through.obj(function (file, enc, cb) {\r\n      var isSourceMap = /\\.map$/.test(file.path);\r\n      if (!isSourceMap) this.push(file);\r\n      cb();\r\n    }))\r\n    .pipe(gulp.dest('valamar/static/js/dist/'))\r\n    .on('end', reload);\r\n});\r\n```\r\n\r\nDefault gulp task:\r\n```\r\ngulp.task('default', ['sass', 'js'], () => {\r\n  browserSync.init({\r\n    proxy: 'localhost:8000',\r\n    ghostMode: false,\r\n    notify: false,\r\n    open: false,\r\n    ui: false\r\n```\r\n\r\nWebpack config:\r\n```\r\n  watch: true,\r\n  devtool: 'source-map',\r\n  resolve: {\r\n    modulesDirectories: ['node_modules', dir_js]\r\n  },\r\n  entry: {\r\n    vendor: ['jquery'],\r\n    app: path.resolve(dir_js, 'app/app.js'),\r\n    admin: path.resolve(dir_js, 'admin/admin.js')\r\n  },\r\n  output: {\r\n    path: dir_build,\r\n    filename: '[name].js'\r\n  },\r\n  module: {\r\n    loaders: [{\r\n      test: /\\.js$/,\r\n      exclude: /(node_modules|vendor)/,\r\n      loader: 'babel-loader'\r\n    }]\r\n  },\r\n  plugins: [\r\n    // new webpack.optimize.DedupePlugin(),\r\n    new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js')\r\n  ]\r\n```"}}
{"actor":{"display_login":"ivancuric"}}