L
L
lolrofl012019-10-18 23:06:03
Web development
lolrofl01, 2019-10-18 23:06:03

How to auto change paths in webpack?

Good afternoon.
I'm building using webpack, everything is cool, but there is one BUT. In the dev version, I throw images into the images folder and set up webpack to automatically copy these images to build/assets/images during the build. So, when I type, I paste the path /images/image.png. After the build, this path remains in all html files, so the images are not loaded. You have to manually change /images/image.png to /assets/images/image.png. Is it possible to somehow register somewhere so that in the dev versions the paths remain as I indicated, and when they are built, they are overwritten with new ones?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question