MCPcopy
hub / github.com/tailwindlabs/tailwindcss / addWatchFile

Method addWatchFile

packages/@tailwindcss-vite/src/index.ts:469–484  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

467 let inputPath = idToPath(this.id)
468
469 function addWatchFile(file: string) {
470 // Don't watch the input file since it's already a dependency and causes
471 // issues with some setups (e.g. Qwik).
472 if (file === inputPath) {
473 return
474 }
475
476 // Scanning `.svg` file containing a `#` or `?` in the path will
477 // crash Vite. We work around this for now by ignoring updates to them.
478 //
479 // https://github.com/tailwindlabs/tailwindcss/issues/16877
480 if (/[#?].*\.svg$/.test(file)) {
481 return
482 }
483 _addWatchFile(file)
484 }
485
486 let requiresBuildPromise = this.requiresBuild()
487 let inputBase = path.dirname(path.resolve(inputPath))

Callers 1

handlerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected