mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Don't watch files in node_modules
This commit is contained in:
parent
bcc2449a29
commit
2b91157760
@ -17,17 +17,22 @@ export default function getModuleDependencies(entryFile) {
|
||||
// Iterate over the modules, even when new
|
||||
// ones are being added
|
||||
for (const mdl of modules) {
|
||||
mdl.requires.forEach(dep => {
|
||||
try {
|
||||
const basedir = path.dirname(mdl.file)
|
||||
const depPath = resolve.sync(dep, { basedir })
|
||||
const depModule = createModule(depPath)
|
||||
mdl.requires
|
||||
.filter(dep => {
|
||||
// Only track local modules, not node_modules
|
||||
return dep.startsWith('./') || dep.startsWith('../')
|
||||
})
|
||||
.forEach(dep => {
|
||||
try {
|
||||
const basedir = path.dirname(mdl.file)
|
||||
const depPath = resolve.sync(dep, { basedir })
|
||||
const depModule = createModule(depPath)
|
||||
|
||||
modules.push(depModule)
|
||||
} catch (_err) {
|
||||
// eslint-disable-next-line no-empty
|
||||
}
|
||||
})
|
||||
modules.push(depModule)
|
||||
} catch (_err) {
|
||||
// eslint-disable-next-line no-empty
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return modules
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user