Update excluded pages paths logic. Add HMR retries on errors.

This commit is contained in:
2026-04-12 05:47:12 +01:00
parent e0c2ab5872
commit 532d0d6b56
29 changed files with 168 additions and 65 deletions
+6 -2
View File
@@ -3,6 +3,7 @@ import grabDirNames from "./grab-dir-names";
import path from "path";
import AppNames from "./grab-app-names";
import pagePathTransform from "./page-path-transform";
import checkExcludedPatterns from "./check-excluded-patterns";
export default function grabAllPages(params) {
const { PAGES_DIR } = grabDirNames();
const pages = grabPageDirRecursively({ page_dir: PAGES_DIR });
@@ -31,7 +32,10 @@ function grabPageDirRecursively({ page_dir }) {
if (page.match(new RegExp(`${AppNames["RootPagesComponentName"]}`))) {
continue;
}
if (page.match(/\(|\)|--|\/api\//)) {
if (checkExcludedPatterns({ path: page })) {
continue;
}
if (page.match(/\/api\//)) {
continue;
}
if (page_name.split(".").length > 2) {
@@ -39,7 +43,7 @@ function grabPageDirRecursively({ page_dir }) {
}
const page_stat = statSync(full_page_path);
if (page_stat.isDirectory()) {
if (page.match(/\(|\)/))
if (checkExcludedPatterns({ path: page }))
continue;
const new_page_files = grabPageDirRecursively({
page_dir: full_page_path,