MQuy / webpack-deadcode-plugin

Webpack plugin to detect unused files and unused exports in used files
MIT License
348 stars 16 forks source link

Cannot detect import type and ts types file #64

Open koeika opened 9 months ago

koeika commented 9 months ago

import type {abc} from 'types/Edit.ts' Edit.ts still in used, but output as unusedFiles.

koeika commented 9 months ago

plugin used afteremit hook, while ts type interface files and import type will be deleted during webpack compiler.
Can we do sth to preserve these ts type files, and delete them after detecting unusedFiles?