Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

less-loader

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less-loader - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

13

index.js

@@ -23,2 +23,3 @@ /*

var errored = false;
var rootContext = this.context;
less.Parser.fileLoader = function (url, currentFileInfo, callback) {

@@ -29,3 +30,2 @@ var context = currentFileInfo.currentDirectory.replace(trailingSlash, "");

entryPath: currentFileInfo.entryPath,
rootpath: currentFileInfo.rootpath,
rootFilename: currentFileInfo.rootFilename

@@ -45,3 +45,3 @@ };

filename = normalizePath(filename);
updateFileInfo(newFileInfo, filename);
updateFileInfo(newFileInfo, rootContext, filename);
// The default (asynchronous)

@@ -65,3 +65,3 @@ loaderContext.loadModule("-!" + __dirname + "/stringify.loader.js!" + filename, function(err, data) {

filename = normalizePath(filename);
updateFileInfo(newFileInfo, filename);
updateFileInfo(newFileInfo, rootContext, filename);
var data = fs.readFileSync(filename, 'utf-8');

@@ -84,3 +84,2 @@ callback(null, data, filename, newFileInfo);

relativeUrls: true,
rootpath: normalizePath(this.context) + "/",
compress: !!this.minimize

@@ -93,6 +92,6 @@ }, function(e, result) {

function updateFileInfo(fileInfo, filename) {
function updateFileInfo(fileInfo, rootContext, filename) {
fileInfo.filename = filename;
fileInfo.currentDirectory = path.dirname(filename);
fileInfo.rootpath = path.relative(fileInfo.rootpath, fileInfo.currentDirectory).replace(/\\/g, "/") + "/";
fileInfo.rootpath = (path.relative(rootContext, fileInfo.currentDirectory).replace(/\\/g, "/") || ".") + "/";
}

@@ -106,2 +105,2 @@

return path;
}
}
{
"name": "less-loader",
"version": "0.7.3",
"version": "0.7.4",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "less loader module for webpack",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc