@@ -17,7 +17,6 @@ import debugUtil from "debug";
1717
1818import wrapResponse from "./server/wrapResponse.js" ;
1919import ipAddress from "./server/ipAddress.js" ;
20- import { findFiles } from "./server/globUtil.js" ;
2120
2221const require = createRequire ( import . meta. url ) ;
2322const pkg = require ( "./package.json" ) ;
@@ -175,10 +174,9 @@ export default class EleventyDevServer {
175174 return this . #watcher;
176175 }
177176
178- let files = findFiles ( this . options . watch ) ;
179- debug ( "Watching globs: %O, files: %O" , this . options . watch , files ) ;
177+ debug ( "Watching files: %O" , this . options . watch ) ;
180178 // TODO if using Eleventy and `watch` option includes output folder (_site) this will trigger two update events!
181- this . #watcher = chokidar . watch ( files , {
179+ this . #watcher = chokidar . watch ( this . options . watch , {
182180 // TODO allow chokidar configuration extensions (or re-use the ones in Eleventy)
183181
184182 ignored : [ "**/node_modules/**" , ".git" ] ,
@@ -212,10 +210,9 @@ export default class EleventyDevServer {
212210 }
213211 }
214212
215- watchFiles ( globs ) {
216- if ( Array . isArray ( globs ) && globs . length > 0 ) {
217- let files = findFiles ( globs ) ;
218- debug ( "Also watching globs: %O files: %O" , globs , files ) ;
213+ watchFiles ( files ) {
214+ if ( Array . isArray ( files ) && files . length > 0 ) {
215+ debug ( "Also watching: %O" , files ) ;
219216 this . watcher . add ( files ) ;
220217 }
221218 }
0 commit comments