Merge pull request #1121 from serh11p/fix-unresolved-modules-in-config-watcher
Fix unresolved modules in config watcher
This commit is contained in:
commit
4691f70e9f
1 changed files with 8 additions and 4 deletions
|
|
@ -18,11 +18,15 @@ export default function getModuleDependencies(entryFile) {
|
|||
// ones are being added
|
||||
for (const mdl of modules) {
|
||||
mdl.requires.forEach(dep => {
|
||||
const basedir = path.dirname(mdl.file)
|
||||
const depPath = resolve.sync(dep, { basedir })
|
||||
const depModule = createModule(depPath)
|
||||
try {
|
||||
const basedir = path.dirname(mdl.file)
|
||||
const depPath = resolve.sync(dep, { basedir })
|
||||
const depModule = createModule(depPath)
|
||||
|
||||
modules.push(depModule)
|
||||
modules.push(depModule)
|
||||
} catch (_err) {
|
||||
// eslint-disable-next-line no-empty
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue