qmhc/vite-plugin-dts

All typescript errors are being swallowed

Closed this issue · 1 comments

Describe the bug

Hi, I have noticed tsc errors don't stop the build process. I would expect any tsc error would stop further declarations build and exit early vite process, instead it is swallowing the errors and finishing build successfully. Is this intended?

Reproduction

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

Steps to reproduce

pnpm i && pnpm build

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: ^5.2.13 => 5.3.1 
    vite-plugin-dts: 3.9.1 => 3.9.1

Validations

qmhc commented

You can try to use the afterDiagnostic option of plugin.