Skip to content

[Bug]: Minifier bug since beta.59 #7848

@lazka

Description

@lazka

Reproduction link or steps

reduced example:

var require_pdfAnnotate = function() {
  return {
    function() { eval() }
  }
}
function n() {}
n.d = (y, x) => {
  for (var z in x)
    n.o()
}, n.o = () => 0
var r
n.d(r, {hT : () => C})

which is minified to (using rolldown index.js --file broken.js --minify):

var require_pdfAnnotate = function () {
  return {
    function() {
      eval();
    },
  };
};
function n() {}
((n.d = (e, t) => {
  for (var n in t) n.o();
}),
  (n.o = () => 0));
var r;
n.d(r, { hT: () => C });

What is expected?

$ nodejs index.js

What is actually happening?

After minify I get:

$ nodejs broken.js
TypeError: n.o is not a function

System Info

rolldown --version
rolldown v1.0.0-beta.59

Any additional comments?

It works with rolldown v1.0.0-beta.58

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions