File tree 1 file changed +13
-4
lines changed
packages/@css-blocks/broccoli/src
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,6 @@ export class CSSBlocksAggregate extends BroccoliPlugin {
50
50
// Test if anything has changed since last time. If not, skip trying to update tree.
51
51
let newFsTree = FSTree . fromEntries ( walkSync . entries ( input ) ) ;
52
52
let diff = this . previous . calculatePatch ( newFsTree ) ;
53
- if ( diff . length ) {
54
- this . previous = newFsTree ;
55
- FSTree . applyPatch ( input , output , diff ) ;
56
- }
57
53
58
54
// Auto-discover common preprocessor extensions.
59
55
if ( ! this . _out ) {
@@ -71,6 +67,19 @@ export class CSSBlocksAggregate extends BroccoliPlugin {
71
67
this . _out = path . format ( out ) ;
72
68
}
73
69
70
+ if ( diff . length ) {
71
+ this . previous = newFsTree ;
72
+ let newDiff = new Array < FSTree . Operation > ( ) ;
73
+ for ( let change of diff ) {
74
+ let file = change [ 1 ] ;
75
+ if ( file === this . _out ) {
76
+ continue ;
77
+ }
78
+ newDiff . push ( change ) ;
79
+ }
80
+ FSTree . applyPatch ( input , output , newDiff ) ;
81
+ }
82
+
74
83
let outHasChanged = ! ! diff . find ( ( o ) => o [ 1 ] === this . _out ) ;
75
84
if ( outHasChanged || this . previousCSS !== css ) {
76
85
let prev = path . join ( input , this . _out ) ;
You can’t perform that action at this time.
0 commit comments