Skip to content

Commit caee07d

Browse files
committed
fix: Actually fix erroneous deletes from rollup
1 parent c659e44 commit caee07d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/rollup/rollup.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,9 @@ module.exports = function(opts) {
4747

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

53-
// First time build should only remove the file and any files that depend on it
54-
// but watchs update need to clear out the file, any files that depend on it,
55-
// AND any files it depends on
56-
if(runs) {
57-
files = processor.dependencies(id).concat(files);
58-
}
59-
6053
files.forEach((file) => processor.remove(file));
6154
}
6255

0 commit comments

Comments
 (0)