Closed DerYeger closed 1 year ago
Fixed by my new plugin vite-plugin-lib.
This is an issue with vite-plugin-dts
, as it doesn't use Vite's path resolution pipeline. It merely looks at the resolve.alias
option.
If someone else comes across this and vite-plugin-lib
doesn't meet your needs, please open an issue in the vite-plugin-dts
repo asking them to support Vite's path resolution.
This plugin seems to not be compatible with vite-plugin-dts. I had expected this plugin to basically just automate the process of defining resolve aliases in my
vite.config.ts
. And it does work fine for resolving imports during builds and typechecks.However, the mentioned declaration-file-generating plugin seems to be incompatible. Builds pass, but the
tsconfig.json
paths are not resolved to relative paths in the generated declaration files.vite-plugin-dts
works fine with resolve aliases, resulting in paths from mytsconfig.json
being replaced by relative paths.Is it possible/feasible to get both plugins working together?
Also see https://github.com/qmhc/vite-plugin-dts/issues/154.