Skip to content

regression, logical assignment is not used in output even if minify: true + target: 'node20' #7295

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

https://stackblitz.com/edit/github-4uhyd9gk?file=tsdown.config.ts,package.json,dist%2Findex.js

What is expected?

The output is

let e=!1;function t(){return e||=!0,e}export{t as fn};

like it was in tsdown 0.11.12.

What is actually happening?

The output is

let e=!1;function t(){return e||(e=!0),e}export{t as fn};

It does not use logical assignment.

Any additional comments?

Found in vitejs/vite#20140

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions