File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/cli/src/commands/dev Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -60,20 +60,20 @@ export const watchPageFiles = (app: App): FSWatcher[] => {
6060 const pagesWatcher = chokidar . watch ( '.' , {
6161 cwd : sourceDir ,
6262 ignored : ( filepath , stats ) => {
63+ const relative = path . relative ( sourceDir , filepath )
64+
6365 // This is important so that folders like node_modules will be ignored immediately without traversing their children
64- if ( ignoreMatcher ( filepath ) ) {
66+ if ( ignoreMatcher ( relative ) ) {
6567 return true
6668 }
6769
6870 // ignore internal temp and cache directories
69- if ( stats ?. isDirectory ( ) ) {
70- return filepath === tempDir || filepath === cacheDir
71+ if ( filepath === tempDir || filepath === cacheDir ) {
72+ return true
7173 }
7274
7375 // ignore non-matched files
74- return (
75- ! ! stats ?. isFile ( ) && ! pageMatcher ( path . relative ( sourceDir , filepath ) )
76- )
76+ return ! ! stats ?. isFile ( ) && ! pageMatcher ( relative )
7777 } ,
7878 ignoreInitial : true ,
7979 } )
You can’t perform that action at this time.
0 commit comments