Update packages/sol-resolver/src/resolvers/npm_resolver.ts
Co-Authored-By: LogvinovLeon <logvinov.leon@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ export class NPMResolver extends Resolver {
|
||||
let currentPath = this._packagePath;
|
||||
const ROOT_PATH = '/';
|
||||
while (currentPath !== ROOT_PATH) {
|
||||
const packagePath = _.isUndefined(packageScope) ? packageName : path.join(packageScope, packageName);
|
||||
const packagePath = _.isUndefined(packageScopeIfExists) ? packageName : path.join(packageScopeIfExists, packageName);
|
||||
const lookupPath = path.join(currentPath, 'node_modules', packagePath, pathWithinPackage);
|
||||
if (fs.existsSync(lookupPath) && fs.lstatSync(lookupPath).isFile()) {
|
||||
const fileContent = fs.readFileSync(lookupPath).toString();
|
||||
|
Reference in New Issue
Block a user