Strapi with Typescript does not remove built .js files for deleted collections

System Information
  • Strapi Version: 4.15
  • Operating System: macOS 14
  • Database: SQLite
  • Node Version: 20
  • NPM Version: 9
  • Yarn Version: 3

I added Typescript on my Strapi project, following the official docs.

It seems to work, but we have one annoying issue: when we delete a collection from the admin panel, the .ts files are deleted, but the js files are not removed from ./dist. So, on my admin panel, I still see my old collection, and I can’t interact with it.

Is there any way to make Strapi (or Typescript, I don’t know) automatically clean the js files as well?

Thanks :wink: