Skip to content

Commit f711d60

Browse files
committed
fix for dev server reload sensitivity (site_libs)
1 parent 101c404 commit f711d60

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/command/serve/watch.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export function watchProject(
6666

6767
// lib dir
6868
const libDirConfig = project.config?.project[kProjectLibDir];
69+
const libDirSource = libDirConfig
70+
? join(project.dir, libDirConfig)
71+
: undefined;
6972
const libDir = libDirConfig ? join(outputDir, libDirConfig) : undefined;
7073

7174
// if any of the paths are in the output dir (but not the lib dir) then return true
@@ -84,6 +87,10 @@ export function watchProject(
8487

8588
// is this a resource file?
8689
const isResourceFile = (path: string) => {
90+
// exclude libdir
91+
if (libDirSource && path.startsWith(libDirSource)) {
92+
return false;
93+
}
8794
if (renderResult) {
8895
if (project.files.resources?.includes(path)) {
8996
return true;

0 commit comments

Comments
 (0)