Update excluded pages paths logic. Add HMR retries on errors.
This commit is contained in:
+2
-4
@@ -1,11 +1,9 @@
|
||||
import { watch, existsSync, statSync } from "fs";
|
||||
import path from "path";
|
||||
import grabDirNames from "../../utils/grab-dir-names";
|
||||
import { log } from "../../utils/log";
|
||||
import allPagesESBuildContextBundler from "../bundler/all-pages-esbuild-context-bundler";
|
||||
import serverPostBuildFn from "./server-post-build-fn";
|
||||
import fullRebuild from "./full-rebuild";
|
||||
import { AppData } from "../../data/app-data";
|
||||
import checkExcludedPatterns from "../../utils/check-excluded-patterns";
|
||||
const { ROOT_DIR } = grabDirNames();
|
||||
export default async function watcherEsbuildCTX() {
|
||||
const pages_src_watcher = watch(ROOT_DIR, {
|
||||
@@ -80,7 +78,7 @@ export default async function watcherEsbuildCTX() {
|
||||
}
|
||||
if (!filename.match(/^src\/pages\/|\.css$/))
|
||||
return reloadWatcher();
|
||||
if (filename.match(/\/(--|\()/))
|
||||
if (checkExcludedPatterns({ path: filename }))
|
||||
return reloadWatcher();
|
||||
if (filename.match(/ /))
|
||||
return reloadWatcher();
|
||||
|
||||
Reference in New Issue
Block a user