Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

300
Visualizações
How to find unused images in public folder in react app

i have a big project with a lot of images in the public folder of react app, is there a way to find all the unused images and clean them up ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is a common issue and this question led to me to search for answers. I stumbled upon this video which helped to partly resolve the issue.

The problem here is that, the plugin used in the video unused-files-webpack-plugin does not support Webpack 5. An issue was raised to update the plugin to support Webpack 5 but the author of the package hasn't issued an update.

A similar package that can be used is the webpack-deadcode-plugin. You can use the implementation from the video and substitute the unused-files-webpack-plugin with the webpack-deadcode-plugin making a few changes (such as to the patterns property which you would have to change to something like: patterns: ['src/**/*.(png|jpg|jpeg)'] for your use case) to adapt the new plugin.

Edit: This answer assumes you are using webpack as your bundler.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda