typescript-declaration-webpack-plugin icon indicating copy to clipboard operation
typescript-declaration-webpack-plugin copied to clipboard

only 1 type declaration in the bundle when I save a file during watch mode

Open ln613 opened this issue 2 years ago • 1 comments

when I watch in dev mode with webpack, when I change a source file and save, typescript-declaration-webpack-plugin only generates the type declaration for the file I changed, I tried to set removeMergedDeclarations = false and webpack config output.clean = false, doesn't help. I guess it's because ts-loader re-emits the type declaration for that file only. How do I set it up in order to regenerate the whole type declaration bundle when I save a single file in watch mode?

ln613 avatar Jul 16 '23 10:07 ln613

I tried to set cache: false in webpack config, it solved half of the issue. type declaration for all ts files containing actual code are regenerated, but ts files containing only types are still not regenerated

ln613 avatar Jul 16 '23 10:07 ln613