Closed wilsonsilva closed 8 months ago
Well it does say in that first section:
in CSS/JS files, you can reference fonts/images saved somewhere in the frontend folder
And I'm not sure what you mean by "completely different use case". This is the use case: if you have images you want pipe through esbuild for hashing purposes, you'll need to use the glob functionality. But if you have some suggestions for better wording, feel free to edit and submit a PR!
Motivation
I need my images to be hashed for caching purposes. I read https://www.bridgetownrb.com/docs/frontend-assets#additional-bundled-assets-fonts-images and it does not mention any modifications to the esbuild config.
I have the image in both locations,
src/images/folder/somefile.png
andfrontend/images/folder/somefile.png
and I'm referencing it in my liquidindex.liquid
template as follows:But I got this error:
Suggestion
I fixed it by following the next chapter: https://www.bridgetownrb.com/docs/frontend-assets#globbing-multiple-assets. It seemed like a completely different use case. My suggestion is to make it clear that unless we import the images in JavaScript, they won't be bundled or found.