Skip to content

Full es2020 compatibility by default #9062

@lgarron

Description

@lgarron

Description

I help maintain a library that requires es2020 syntax (e.g. import.meta.url and bignum support). We'd love to recommend Vite as a bundler that works "out of the box" with batteries included, but this doesn't quite work because the default Vite target is es2019. Our goal is to make it as easy as possible to use our library with little programming experience, and we would really like to suggest a bundler that can be run directly without configuring anything.

The main README.md history says that es2020 used to be the target — back in 2020, actually!. This was revised in d416072 but I can't find out the reasoning why.
I was able to find some discussions and suggestions to update, such as #7279 , but they don't seem to shed any light on this.

Now that it's 2022 and ES2020 is well supported in browsers, would it be possible to revise the default?
If not, could I ask for the reasoning for the current default, and what compatibility threshold might allow it to be revised in the future?

Thanks!

Suggested solution

Change the default target to es2020.

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp3-significantHigh priority enhancement (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions