Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} catch (e) {
debug('error getting dependencies: ' + e.message);
debug(e.stack);
return [];
}
const resolvedDependencies = [];
for (let i = 0, l = dependencies.length; i < l; i++) {
const dep = dependencies[i];
const result = cabinet({
partial: dep,
filename: config.filename,
directory: config.directory,
ast: precinct.ast,
config: config.requireConfig,
webpackConfig: config.webpackConfig,
nodeModulesConfig: config.nodeModulesConfig,
tsConfig: config.tsConfig
});
if (!result) {
debug('skipping an empty filepath resolution for partial: ' + dep);
config.nonExistent.push(dep);
continue;
}
const exists = fs.existsSync(result);
if (!exists) {
config.nonExistent.push(dep);