Skip to content

minifier: removes top-level variable declarations in scripts #12341

@sapphi-red

Description

@sapphi-red
var foo

The code above is transformed to

But this assignment should be kept as foo is a global variable and other scripts may rely on the fact that foo is declared.

playground

refs #10033 #11796

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions