File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const ReloadSite = (options = {}) => {
2626 name : 'reloadsite-plugin' ,
2727
2828 async generateBundle ( options , bundle , isWrite ) {
29+
2930 // start server
3031 try {
3132 // do not run in production
@@ -38,7 +39,7 @@ const ReloadSite = (options = {}) => {
3839 ? true
3940 : picomatch . isMatch ( id , filter ) ;
4041
41- if ( ! fileMatchesFilter ) return ;
42+ if ( ! fileMatchesFilter ) continue ;
4243
4344
4445 if ( / .+ \. [ c m ] ? j s $ / . test ( id ) ) {
@@ -49,13 +50,16 @@ const ReloadSite = (options = {}) => {
4950 }
5051 }
5152
53+
5254 // start server
5355 const portUsed = await tcpPortUsed . check ( port , '127.0.0.1' ) ;
56+
5457 // by using portUsed, we ensure we start server only once
5558 if ( ! portUsed ) {
5659 startReloadSiteServer ( { port, dirs, delay } ) ;
5760 }
5861 } catch ( error ) {
62+ console . error ( error ) ;
5963 throw error ;
6064 }
6165 } ,
You can’t perform that action at this time.
0 commit comments