aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.35k stars 50 forks source link

feat: add `ignoreConfigErrors` option #109

Closed jgoux closed 1 year ago

jgoux commented 1 year ago

Fixes https://github.com/aleclarson/vite-tsconfig-paths/issues/107

aleclarson commented 1 year ago

Thanks for the PR!

I adjusted it to use a simple .catch handler and to log some stuff when the Vite project's logLevel isn't silent. If config errors are expected and you want to silence the related logs, you can set ignoreConfigErrors: true in the plugin options.

Note that invalid configs are still ignored by default (as in your original commit), so they won't crash the process.