- Rollup Version: rollup v2.50.0
- Operating System (or Browser): n/a
- Node Version (if applicable): v16.1.0
Repro
2.50.0 REPL
$ cat heisenbug.js
function heisenbug() {
var a;
function f(b) {
if (a) console.log(a === b.c ? "PASS" : "FAIL");
a = b.c;
}
function g() {}
function h() {
f({
c: g
});
}
h();
h();
}
heisenbug();
heisenbug();
// if following line is commented out then rollup generates an empty chunk
//console.log(123);
Expected Behavior
$ cat heisenbug.js | node
PASS
PASS
Actual Behavior
$ cat heisenbug.js | rollup
- → stdout...
(!) Generated an empty chunk
This example worked in rollup 2.48.0.
Repro
2.50.0 REPL
Expected Behavior
Actual Behavior
This example worked in rollup 2.48.0.