Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.tapAsync("DirectoryNamedWebpackPlugin", (request, resolveContext, callback) => {
if (options.ignoreFn && options.ignoreFn(request)) {
return callback();
}
var dirPath = request.path;
var dirName = basename(dirPath);
var attempts = [];
// return if path matches with excludes
if (options.exclude && options.exclude.some(function(exclude) {
return dirPath.search(exclude) >= 0 || stringIncludes(dirPath, exclude);
})) {
return callback();
}
// return if path doesn't match with includes
if (options.include && !options.include.some(function(include) {
return dirPath.search(include) >= 0 || stringIncludes(dirPath, include);
})) {
return callback();
}
DescriptionFileUtils.cdUp('./lib');
DescriptionFileUtils.getField({}, 'hi');
DescriptionFileUtils.loadDescriptionFile(resolve.ResolverFactory.createResolver({
extensions: [''],
fileSystem: {} as AbstractInputFileSystem
}), './lib', ['file'], function () { });
const dplugin1 = new DirectoryExistsPlugin('string', 'string');
const fplugin = new FileExistsPlugin('string', 's');
const fplugin2 = new FileKindPlugin('string', 's');
getPaths('./lib');
basename('./lib');
globToRegExp('lib/**');
const jplugin = new JoinRequestPlugin('string', 's');
const lplugin = new LogInfoPlugin('string');
const mplugin = new MainFieldPlugin('string', {
name: 'hi',
forceRelative: false
}, 's');
const mplugin2 = new ModuleAppendPlugin('string', 'ap', 's');
const mplugin3 = new ModuleKindPlugin('string', 's');
resolver.plugin("directory", function(request, callback) {
var fs = resolver.fileSystem;
var topLevelCallback = callback;
var filename = basename(request.path);
var filePath = resolver.join(request.path, filename);
var obj = assign({}, request, {
path: filePath,
relativePath: request.relativePath && resolver.join(request.relativePath, filename)
});
resolver.doResolve("raw-file", obj, "using path: " + filePath, callback);
});
};