Skip to content

[Bug]: /* #__PURE__ */ inside an IIFE is not respected #3245

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

  1. Open https://stackblitz.com/edit/github-xv4yss-xwmr6v3t?file=src%2Fentry.js,dist%2Fentry.js
  2. npm i and npm run build runs automatically
  3. See the output

What is expected?

The output to be empty.

What is actually happening?

The output is (()=>{const a=()=>{if(__BAR__)console.log()};a()})();.

System Info

Stackblitz

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    rolldown: 1.0.0-beta.1-commit.3a0e84b => 1.0.0-beta.1-commit.3a0e84b

Any additional comments?

If it's not inside an IIFE, it gets removed.

Maybe it's because OXC minifier does not support pure annotations yet?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions