enhanced-resolve
Advanced tools
Comparing version 0.2.9 to 0.3.0
@@ -163,2 +163,4 @@ /* | ||
options.postfixes = [""]; | ||
if(!options.packageMains) | ||
options.packageMains = ["main"]; | ||
if(!options.loaderExtensions) | ||
@@ -168,2 +170,4 @@ options.loaderExtensions = [".node-loader.js", ".loader.js", "", ".js"]; | ||
options.loaderPostfixes = ["-node-loader", "-loader", ""]; | ||
if(!options.loaderPackageMains) | ||
options.loaderPackageMains = ["loader", "main"]; | ||
if(!options.paths) | ||
@@ -301,10 +305,10 @@ options.paths = []; | ||
content = JSON.parse(content); | ||
if(content.webpackLoader && type === "loader") | ||
mainModule = content.webpackLoader; | ||
else if(content.webpack) | ||
mainModule = content.webpack; | ||
else if(content.browserify) | ||
mainModule = content.browserify; | ||
else if(content.main) | ||
mainModule = content.main; | ||
var packageMains = type === "loader" ? options.loaderPackageMains : options.packageMains; | ||
for(var i = 0; i < packageMains.length; i++) { | ||
var field = packageMains[i]; | ||
if(content[field]) { | ||
mainModule = content[field]; | ||
break; | ||
} | ||
} | ||
loadAsFile(join(split(dirname), [mainModule]), options, type, sync, function(err, absoluteFilename) { | ||
@@ -311,0 +315,0 @@ if(!err) return callback(null, absoluteFilename); |
{ | ||
"name": "enhanced-resolve", | ||
"version": "0.2.9", | ||
"version": "0.3.0", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Offers a async require.resolve function. It's highly configurable.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23568
659