File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const defaultPluginOptions = {
99}
1010
1111class BrowserSyncPlugin {
12- constructor ( browserSyncOptions , pluginOptions ) {
12+ constructor ( browserSyncOptions , pluginOptions ) {
1313 this . browserSyncOptions = Object . assign ( { } , browserSyncOptions )
1414 this . options = Object . assign ( { } , defaultPluginOptions , pluginOptions )
1515
@@ -18,7 +18,7 @@ class BrowserSyncPlugin {
1818 this . isBrowserSyncRunning = false
1919 }
2020
21- apply ( compiler ) {
21+ apply ( compiler ) {
2222 const watchRunCallback = ( ) => {
2323 this . isWebpackWatching = true
2424 }
@@ -47,7 +47,10 @@ class BrowserSyncPlugin {
4747 compiler . hooks . compilation . tap ( BrowserSyncPlugin . name , compilationCallback )
4848 compiler . hooks . done . tap ( BrowserSyncPlugin . name , doneCallback )
4949 } else {
50- compiler . plugin ( 'watch-run' , watchRunCallback )
50+ compiler . plugin ( 'watch-run' , ( watching , callback ) => {
51+ watchRunCallback ( )
52+ callback ( null , null )
53+ } )
5154 compiler . plugin ( 'compilation' , compilationCallback )
5255 compiler . plugin ( 'done' , doneCallback )
5356 }
You can’t perform that action at this time.
0 commit comments