mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
improve some of the source map options
This commit is contained in:
@@ -292,9 +292,11 @@ if (options.sourceMap) {
|
||||
}
|
||||
}
|
||||
|
||||
sourceMapOptions.sourceMapBasepath = sourceMapOptions.sourceMapBasepath || (input ? path.dirname(input) : process.cwd());
|
||||
if (sourceMapOptions.sourceMapBasepath === undefined) {
|
||||
sourceMapOptions.sourceMapBasepath = input ? path.dirname(input) : process.cwd();
|
||||
}
|
||||
|
||||
if (!sourceMapOptions.sourceMapRootpath) {
|
||||
if (sourceMapOptions.sourceMapRootpath === undefined) {
|
||||
var pathToMap = path.dirname(sourceMapFileInline ? output : sourceMapOptions.sourceMapFullFilename),
|
||||
pathToInput = path.dirname(sourceMapOptions.sourceMapInputFilename);
|
||||
sourceMapOptions.sourceMapRootpath = path.relative(pathToMap, pathToInput);
|
||||
|
||||
Reference in New Issue
Block a user