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

82
Visualizações
How to optimize and copy assets folder with parceljs

I'm currently moving on from my old Gulp config to ParcelJS.

I used to have a simple way of handling my images assets:

Watch all the files in src/images => Imagemin them or SVGO them if SVG => Copy them in dist/images.

I'm trying to do the same with parcel. As far as i understand, Parcel watch my JS and SCSS files, check if there are any images called, and copy them in my dist folder with an hash added in the filename. Something like "background.83EJKMfd.jpg".

I'd like to have something more like the old way. Optimize my images, svgo them if needed, and copy them in the dist folder, with the same structure as in my src folder.

Here is my current package.json file.

"scripts": {
"watch": "parcel watch src/js/main.js src/scss/style.scss",
"build": "parcel build"
},

Regards.

about 4 years ago · Juan Pablo Isaza
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