Skip to content

Commit

Permalink
fixed DevServer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
opiepj committed Apr 28, 2016
1 parent 46d90e2 commit f876184
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ var WebpackShellPlugin = function () {

if (compiler.options.port) {
this.options.port = compiler.options.port;
} else if (compiler.options.devServer.port) {
this.options.port = compiler.options.devServer.port;
} else if (compiler.options.devServer) {
if (compiler.options.devServer.port) {
this.options.port = compiler.options.devServer.port;
}
}

compiler.plugin('done', function (compilation) {
Expand Down
6 changes: 4 additions & 2 deletions src/webpack-browser-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ export default class WebpackShellPlugin {
apply(compiler) {
if (compiler.options.port) {
this.options.port = compiler.options.port;
} else if (compiler.options.devServer.port) {
this.options.port = compiler.options.devServer.port;
} else if (compiler.options.devServer) {
if (compiler.options.devServer.port) {
this.options.port = compiler.options.devServer.port;
}
}

compiler.plugin('done', (compilation) => {
Expand Down

0 comments on commit f876184

Please sign in to comment.