Skip to content

Commit

Permalink
fix node_modules search function
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-fxpig committed May 28, 2020
1 parent d33a53f commit 08464ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const generateConfig = ({extensionPath, devMode=false, customOutputPath, analyze
const coreDepParts = coreDep.split(":");
if (!resolvedCoreDeps[coreDepParts[0] || coreDep]) {
const modulePath = path.join(baseDir, "node_modules", coreDepParts[1] || coreDep);
foundNodeModules = foundNodeModules && fs.existsSync(modulePath);
if (foundNodeModules) resolvedCoreDeps[coreDepParts[0] || coreDep] = modulePath;
if (fs.existsSync(modulePath)) resolvedCoreDeps[coreDepParts[0] || coreDep] = modulePath;
else foundNodeModules = false;
}
}
baseDir = path.resolve(baseDir, "..");
Expand Down

0 comments on commit 08464ac

Please sign in to comment.