mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix(monorepo/electron): fix some sub-dependencies not being copied
This commit is contained in:
parent
3558d3aced
commit
e408f7d8f1
@ -45,9 +45,17 @@ function copyNodeModules(packageJsonPath: string) {
|
||||
}
|
||||
|
||||
const src = path.join(rootDir, "node_modules", dependency);
|
||||
if (!fs.existsSync(src)) {
|
||||
console.warn(`Dependency ${dependency} not found in node_modules. Skipping.`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const dest = path.join(DEST_DIR, "node_modules", dependency);
|
||||
log(`${src} -> ${dest}`);
|
||||
fs.copySync(src, dest);
|
||||
|
||||
// Copy sub-dependencies as well.
|
||||
copyNodeModules(path.join(src, "package.json"));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user