X Tutup
Skip to content

Commit 8516473

Browse files
committed
build(broccoli-typescript): check for map files before deleting them
fixes angular#5610 Closes angular#6065
1 parent cab69f6 commit 8516473

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/broccoli/broccoli-typescript.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
212212

213213
if (fs.existsSync(absoluteJsFilePath)) {
214214
fs.unlinkSync(absoluteJsFilePath);
215-
fs.unlinkSync(absoluteMapFilePath);
215+
if (fs.existsSync(absoluteMapFilePath)) {
216+
// source map could be inline or not generated
217+
fs.unlinkSync(absoluteMapFilePath);
218+
}
216219
fs.unlinkSync(absoluteDtsFilePath);
217220
}
218221
}

0 commit comments

Comments
 (0)
X Tutup