Skip to content

Commit

Permalink
fix: Actually fix erroneous deletes from rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
tivac committed Jul 5, 2018
1 parent c659e44 commit caee07d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/rollup/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,9 @@ module.exports = function(opts) {

// If the file is being re-processed we need to remove it to
// avoid cache staleness issues
if(id in processor.files) {
let files = [ id ];
if(runs && (id in processor.files)) {
const files = processor.dependencies(id).concat(id);

// First time build should only remove the file and any files that depend on it
// but watchs update need to clear out the file, any files that depend on it,
// AND any files it depends on
if(runs) {
files = processor.dependencies(id).concat(files);
}

files.forEach((file) => processor.remove(file));
}

Expand Down

0 comments on commit caee07d

Please sign in to comment.