O
O
ozone_R2021-03-05 16:37:45
symfony
ozone_R, 2021-03-05 16:37:45

Why is unmodified svg files re-created when building frontend prod with webpack encore?

Let's say git has an old frontend build. I run npm run build and webpack removes the svgs and replaces them with new ones with a different hash. Files, respectively, disappear from the index, I need to add them to git again. But I didn't change them! The content of the files before and after the command is absolutely identical. And the one who collected the first time - everything is fine. He collected in docker under macos. I build in docker from under WSL. When I commit and rebuild everything is fine, svg files are not recreated.

What could be the reason?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
ozone_R, 2021-03-10
@ozone_R

The problem was transfers. On a poppy, prod was built with lf transfers - one hash was set for svg files, and in wsl it was built with crlf - with a different hash.

M
Maxim, 2021-03-05
@myks92

Remove the build folder from git. She is not needed there. Most often, this is the public or build folder, into which all resources are published.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question