Skip to content

Commit 245eb54

Browse files
onweructron
authored andcommitted
embed sass source-maps in non-release builds
1 parent 14e7c63 commit 245eb54

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/pipelines/sass.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,19 @@ impl Sass {
103103
.display()
104104
.to_string();
105105

106+
let (no_source_map, expanded_style) = ("---no-source-map", "expanded");
107+
let (source_map, output_style) = match self.cfg.release {
108+
true => match self.cfg.no_minification {
109+
true => (no_source_map, expanded_style),
110+
false => (no_source_map, "compressed"),
111+
},
112+
false => ("--embed-source-map", expanded_style),
113+
};
114+
106115
let args = &[
107-
"--no-source-map",
116+
source_map,
108117
"--style",
109-
match self.cfg.release && !self.cfg.no_minification {
110-
true => "compressed",
111-
false => "expanded",
112-
},
118+
output_style,
113119
&source_path_str,
114120
&temp_target_file_path,
115121
];

0 commit comments

Comments
 (0)