Skip to content

Commit

Permalink
fix(browserSync): use the right value of port
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Feb 3, 2016
1 parent 3c21b3a commit 202ac7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,14 @@ module.exports = function (type, options) {
config.plugins.push(new NpmInstallPlugin())
}
if (options.browserSync) {
let port = 23789
if (typeof options.browserSync === 'number') {
port = options.port
}
config.plugins.push(new BrowserSyncPlugin({
proxy: `localhost:${options.port || 7888}`,
files: [cwd('build/**/*')],
port: options.browserSync || 23789
port
}))
}
} else if (type === 'build') {
Expand Down

0 comments on commit 202ac7e

Please sign in to comment.