Skip to content

minifier: drop constructed functions/objects #14207

@KTibow

Description

@KTibow

Found this while bundling Ripple. This is required for parity with Rollup/Terser/SWC.

function A() {}
A.from = () => {}
const B = {}
B.from = () => {}

should be able to minify into nothing.

New assumptions would be required to accomplish this, per @sapphi-red:

These require Object.prototype.from / Function.prototype.from to not be a setter with a sideeffect

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions