less-loader
Advanced tools
Comparing version 0.6.2 to 0.7.0
@@ -17,11 +17,12 @@ /* | ||
var errored = false; | ||
var rootContext = this.context; | ||
less.Parser.fileLoader = function (file, currentFileInfo, callback, env) { | ||
var context = currentFileInfo.currentDirectory.replace(/[\\\/]$/, ""); | ||
var newFileInfo = { | ||
relativeUrls: env.relativeUrls, | ||
relativeUrls: env.relativeUrls || true, | ||
entryPath: currentFileInfo.entryPath, | ||
rootpath: currentFileInfo.rootpath, | ||
rootFilename: currentFileInfo.rootFilename | ||
}; | ||
var context = currentFileInfo.currentDirectory.replace(/[\\\/]$/, ""); | ||
var moduleName = urlToRequire(file) | ||
var moduleName = urlToRequire(file); | ||
if(cb) { | ||
@@ -37,2 +38,3 @@ loaderContext.resolve(context, moduleName, function(err, filename) { | ||
newFileInfo.currentDirectory = path.dirname(filename); | ||
newFileInfo.rootpath = "./" + path.relative(rootContext, newFileInfo.currentDirectory) + "/"; | ||
// The default (asynchron) | ||
@@ -55,2 +57,3 @@ loaderContext.loadModule("-!" + __dirname + "/stringify.loader.js!" + filename, function(err, data) { | ||
newFileInfo.currentDirectory = path.dirname(filename); | ||
newFileInfo.rootpath = "./" + path.relative(rootContext, newFileInfo.currentDirectory) + "/"; | ||
// Make it synchron | ||
@@ -57,0 +60,0 @@ try { |
{ | ||
"name": "less-loader", | ||
"version": "0.6.2", | ||
"version": "0.7.0", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "less loader module for webpack", |
@@ -0,0 +0,0 @@ /* |
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
3992
90