evanw/esbuild

Unrecognized target environment "ES2024"

Closed this issue · 0 comments

I am using esbuild 0.24.0 via Vite, I get the warning/error Unrecognized target environment "ES2024" which seems to come from

switch lowerValue {
case "es3", "es5", "es6", "es2015", "es2016", "es2017", "es2018", "es2019", "es2020", "es2021":
result.Settings.Target = config.TSTargetBelowES2022
case "es2022", "es2023", "esnext":
result.Settings.Target = config.TSTargetAtOrAboveES2022
default:
ok = false
if !helpers.IsInsideNodeModules(source.KeyPath.Text) {
log.AddID(logger.MsgID_TSConfigJSON_InvalidTarget, logger.Warning, &tracker, source.RangeOfString(valueJSON.Loc),
fmt.Sprintf("Unrecognized target environment %q", value))
}
}