vite-dts icon indicating copy to clipboard operation
vite-dts copied to clipboard

Mention limitations

Open aleclarson opened this issue 3 years ago • 2 comments

Incompatible with libraries using the following options in tsconfig.json...

  • baseUrl
  • paths
  • esModuleInterop (if not also enabled in the consuming project)

Maybe more?

aleclarson avatar Jul 13 '21 03:07 aleclarson

Yes, just hit the 'paths' issue today. I think it's better to document it

oliverzy avatar Jul 20 '21 12:07 oliverzy

I'm also unable to use this plugin because our library uses typescript-plugin-css-modules, so if the host application doesn't have it installed the type check fails (it will build fine from the bundle if you don't have a type validation stage in your build toolchain, but tsc --noEmit will fail because for some reason it doesn't treat the imports the same as it would from other node_modules packages). If you are using it to build libraries that you will use in your own host applications with the same build toolchain and configuration it's fine, but I don't think it's the right solution for a library meant for public consumption. It would be nice if these limitations were mentioned in the README, as it would have saved me a couple of hours of troubleshooting.

parkerault avatar May 04 '22 20:05 parkerault