We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6728b4a commit 844a731Copy full SHA for 844a731
src/lib/run.js
@@ -335,6 +335,23 @@ async function run(
335
336
console.log(`Full PATH ${fullPath}`);
337
338
+ const urlFile = fsOperation(fullPath);
339
+
340
+ const stats = await urlFile.stat();
341
342
+ if (!stats.exists) {
343
+ error(reqId);
344
+ return;
345
+ }
346
347
+ if (!stats.isFile) {
348
+ if (fullPath.endsWith("/")) {
349
+ fullPath += "index.html";
350
+ } else {
351
+ fullPath += "/index.html";
352
353
354
355
// Add back the query if present
356
url = query ? `${fullPath}?${query}` : fullPath;
357
0 commit comments