Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

80
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!