File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,10 @@ var WebpackShellPlugin = function () {
60
60
61
61
if ( compiler . options . port ) {
62
62
this . options . port = compiler . options . port ;
63
- } else if ( compiler . options . devServer . port ) {
64
- this . options . port = compiler . options . devServer . port ;
63
+ } else if ( compiler . options . devServer ) {
64
+ if ( compiler . options . devServer . port ) {
65
+ this . options . port = compiler . options . devServer . port ;
66
+ }
65
67
}
66
68
67
69
compiler . plugin ( 'done' , function ( compilation ) {
Original file line number Diff line number Diff line change @@ -25,8 +25,10 @@ export default class WebpackShellPlugin {
25
25
apply ( compiler ) {
26
26
if ( compiler . options . port ) {
27
27
this . options . port = compiler . options . port ;
28
- } else if ( compiler . options . devServer . port ) {
29
- this . options . port = compiler . options . devServer . port ;
28
+ } else if ( compiler . options . devServer ) {
29
+ if ( compiler . options . devServer . port ) {
30
+ this . options . port = compiler . options . devServer . port ;
31
+ }
30
32
}
31
33
32
34
compiler . plugin ( 'done' , ( compilation ) => {
You can’t perform that action at this time.
0 commit comments