R
R
RDashie2021-05-02 23:17:23
webpack
RDashie, 2021-05-02 23:17:23

How to copy pictures from a branched folder structure into a single folder?

I have, let's say, the following folder structure:

src
-img
--img1
---img1_1.png
---img1_2.png
---img1_3.png
--img2
---img2_4.png
--img3
---img3_5 .png
---img3_6.png

CopyWebpackPlugin wraps all content from from to to, including the same branching structure. How can I make sure that the pictures are transferred directly to the destination folder without their nesting levels, that is, so that at the end it is not like this:

dist
-img
--img1
---img1_1.png
---img1_2.png
---img1_3.png
- -img2
---img2_4.png
--img3
---img3_5.png
---img3_6.png

and so:
dist
-img
--img1_1.png
--img1_2.png
--img1_3.png
--img2_4.png
--img3_5.png
--img3_6.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2021-05-02
@longclaps

Something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question