philicevic / mix-html-builder

A quick laravel mix extension to build up html templates from partials and layouts.
MIT License
19 stars 8 forks source link

Error: Child compilation failed #26

Closed nepster-web closed 3 years ago

nepster-web commented 3 years ago

I have main html file, and I include _footer.html

main.html

...
<include src="./_footer.html"></include>
...

_footer.html:

...
<img src="./images/icons/phone.svg" alt="phone">
...

so, I see next errors:

изображение

why it happens ?

philicevic commented 3 years ago

Are you sure that the images are at the place where webpack expects them to be?

nepster-web commented 3 years ago

no, there are no pictures in _sections folder.

My structure looks like this:

public

src

I don't need additional processing for images, so the images are in folder public/images/...

philicevic commented 3 years ago

I tried to recreate it and got the same error. You should be able to fix it by using /images/icons/phone.svg instead of ./images/icons/phone.svg. This forces webpack to just paste the absolute path instead of searching for the file.

I don't know if it really is the best solution, but in your case it should be working. The way webpack works i don't think i can do something about it anyway.

nepster-web commented 3 years ago

until now I have not used a web server. apparently need to connect

thank you very much.