qmhc / vite-plugin-dts

A Vite plugin for generating `.d.ts` files.
MIT License
1.31k stars 91 forks source link

vite-plugin-dts cannot handle TS target `es2023` #377

Open fdw opened 2 months ago

fdw commented 2 months ago

Describe the bug

I would like to compile my TS with the target es2023. However, vite-plugin-dts fails during build:

[vite:dts] Error parsing tsconfig.json content: Argument for '--target' option must be: 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'esnext'.

Could you please add es2023 to the valid targets?

Reproduction

https://stackblitz.com/edit/vitejs-vite-yvyhes?file=vite.config.ts

Steps to reproduce

Run npm build

System Info

System:
    OS: Linux 6.10 Manjaro Linux
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 10.49 GB / 31.08 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.6.0 - /usr/bin/node
    npm: 10.8.2 - /usr/bin/npm
  npmPackages:
    vite: ^5.4.2 => 5.4.2 
    vite-plugin-dts: ^4.0.3 => 4.0.3 


### Validations

- [X] Read the [FAQ](https://github.com/qmhc/vite-plugin-dts#faq).
- [X] Check that there isn't [already an issue](https://github.com/qmhc/vite-plugin-dts/issues) that reports the same bug to avoid creating a duplicate.
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
fdw commented 2 months ago

I suspect the problem is this: https://github.com/microsoft/rushstack/issues/4930