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

rollupTypes won't rollup types in node_modules

Open nodegin opened this issue 2 years ago • 1 comments

Hi, so I have a library contains something like

import { DropzoneOptions } from 'react-dropzone'

export interface DropzoneOptionsWithExtra extends DropzoneOptions {
  extraProp: any;
}

then after I build via vite, I am got something exactly same, while I guess I would expect something to be rolled up:

type DropzoneOptions = Pick<React.HTMLProps<HTMLElement>, PropTypes> & {
  ...
};

export interface DropzoneOptionsWithExtra extends DropzoneOptions {
  extraProp: any;
}

due to this nature, my main project which uses this library doesn't install react-dropzone as dependency,

it causes DropzoneOptionsWithExtra only has extraProp but not anything from DropzoneOptions because DropzoneOptions is not found

nodegin avatar Jun 16 '22 14:06 nodegin

Could you provide a reproduction?

Or maybe you can try to add it as a dev dependency.

qmhc avatar Jun 16 '22 15:06 qmhc