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.