Skip to content

Commit 9f9001c

Browse files
committed
debugged loop return instead of continue
1 parent a86ed70 commit 9f9001c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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 (/.+\.[cm]?js$/.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
},

0 commit comments

Comments
 (0)