Skip to content

ESBuild breaks valid JS expression in the CoreJS library resulting in a SyntaxError #3975

@diego-carvallo

Description

@diego-carvallo

We use ViteJS in multiple of our services, we have CoreJS as a dependency and as sub-dependecy.

When building Vite minifies using ESBuild and this particular expressions get's broken:
var toString = uncurryThis(1.0.toString);

ref: see related core-js code here

ESBuild removes the zero and the minified result is: var toString$b=uncurryThis$y(1.toString); which give us the Syntax Error in the following screenshot:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions