Skip to content

Support ES2024 as build target for Vite CSS plugin #21293

@bndkt

Description

@bndkt

Description

When using the Cloudflare Vite plugin, it sets the build target to "es2024", which lead to the following error being thrown on build:

error during build:
Build failed with 1 error:

[plugin vite:css-post]
Error: [lightningcss minify] Unsupported target "es2024"

Suggested solution

I saw that there was a PR to add "es2023" as a build target for the CSS plugin. I attempted to create a similar PR but notices that caniuse doesn't list "es2024" yet. Not sure was this mean for Vite, I created a PR that would basically add "es2024" as an alias for "es2023" but am happy to adjust based on your guidance.

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions