Commit a5fc020
fix(@angular/build): watch all related files during a Sass error
When `dart-sass` returns an error, the provided location span may not be
the exact location of the error but can instead be the location of the
`@error` call within a Sass function. The generated stack trace string
does contain all files related to the error including the usage site in
the case of the function `@error` case. To ensure all related files for
the error are watched and allow for a rebuild that may correct the error,
the stack trace is parsed and found files are added to the watch list.
Unfortunately, `dart-sass` does not provide the list directly. If that
changes in the future, the stack trace parsing could be removed.1 parent 22e05dc commit a5fc020
File tree
1 file changed
+32
-1
lines changed- packages/angular/build/src/tools/esbuild/stylesheets
1 file changed
+32
-1
lines changedLines changed: 32 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
| |||
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
185 | | - | |
| 190 | + | |
186 | 191 | | |
187 | 192 | | |
188 | 193 | | |
| |||
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
0 commit comments