File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,12 @@ class DiffingTraceurCompiler implements DiffingBroccoliPlugin {
4444 } ) ;
4545
4646 treeDiff . removedPaths . forEach ( ( removedFilePath ) => {
47- var destFilepath = removedFilePath . replace ( / \. \w + $ / , this . options . destExtension ) ;
48- var absoluteOuputFilePath = path . join ( this . cachePath , destFilepath ) ;
49- fs . unlinkSync ( absoluteOuputFilePath ) ;
47+ var extension = path . extname ( removedFilePath ) . toLowerCase ( ) ;
48+ if ( extension === '.js' || extension === '.es6' || extension === '.cjs' ) {
49+ var destFilepath = removedFilePath . replace ( / \. \w + $ / , this . options . destExtension ) ;
50+ var absoluteOuputFilePath = path . join ( this . cachePath , destFilepath ) ;
51+ fs . unlinkSync ( absoluteOuputFilePath ) ;
52+ }
5053 } ) ;
5154 }
5255}
You can’t perform that action at this time.
0 commit comments