Skip to content

Commit 0dc3eda

Browse files
author
Andrey Fedoseev
committed
Fix "file" attribute in LESS source map – it should be the name of compiled file, not the source file
1 parent 01f6ec0 commit 0dc3eda

File tree

1 file changed

+1
-1
lines changed
  • static_precompiler/compilers

1 file changed

+1
-1
lines changed

static_precompiler/compilers/less.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def compile_file(self, source_path):
6969
# is not in the same dir as the source file. We fix it here.
7070
sourcemap["sourceRoot"] = "../" * len(source_path.split("/")) + posixpath.dirname(source_path)
7171

72-
sourcemap["file"] = posixpath.basename(source_path)
72+
sourcemap["file"] = posixpath.basename(full_output_path)
7373

7474
with open(sourcemap_full_path, "w") as sourcemap_file:
7575
sourcemap_file.write(json.dumps(sourcemap))

0 commit comments

Comments
 (0)