swc-project / swc

Rust-based platform for the Web
https://swc.rs
Apache License 2.0
30.9k stars 1.2k forks source link

unknown variant `ESNext` #9287

Closed Enteleform closed 1 month ago

Enteleform commented 1 month ago

Describe the bug

I am experiencing the same bug described in https://github.com/swc-project/swc/issues/8516, which was supposed to be resolved by https://github.com/swc-project/swc/pull/8653.

When set compilerOptions.target: "ESNext" (title case), I got error:

[vite] Internal server error: unknown variant `ESNext`, expected one of `es3`, `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020`, `es2021`, `es2022`, `esnext` at line 1 column 241 Plugin: swc

Relevant Dependencies, up to date as of today:

"unplugin-swc": 1.5.1
"@swc/core":    1.7.0

Playground link (or link to the minimal reproduction)

https://stackblitz.com/edit/vitejs-vite-pezqps?file=package.json

Expected behavior

swc should accept ESNext and other PascalCase variants, as defined in https://json.schemastore.org/tsconfig.json

Version

1.7.0

Enteleform commented 1 month ago

@kdy1

kdy1 commented 1 month ago

Use EsNext instead

Enteleform commented 1 month ago

@kdy1

That does not match the JSON schema specification for tsconfig.json, which is implemented in IntelliSense as well: image

swc-bot commented 1 week ago

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.