roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.75k stars 3.06k forks source link

Bug: Images in resources/images go into public root directly #3071

Closed SergiArias closed 2 years ago

SergiArias commented 2 years ago

Terms

Description

What's wrong?

Images in resources/images go into public root directly when yarn dev or yarn build. Fonts go into fonts folder as expected.

Steps To Reproduce

Place a svg image in resources/images and run yarn dev. It will compile it into public/image.svg

Expected Behavior

It should compile into public/images/image.svg

Actual Behavior

I compiles into public/image.svg

Relevant Log Output

No response

Versions

v10.1.7

giorgiodare commented 2 years ago

I have the same issue: all the content from the images/fonts folder and subfolder don't get compiled correctly.

retlehs commented 2 years ago

thanks for the report! for now you can make this change to your bud config:

replace this:

https://github.com/roots/sage/blob/16d99623a90eb4d48fc97bbc8b2121f64c12d9f9/bud.config.js#L22

with this:

    .assets([
      {from: app.path("@src/images"), to: app.path("@dist/images/@file")},
      {from: app.path("@src/fonts"), to: app.path("@dist/fonts/@file")},
    ])
SergiArias commented 2 years ago

Amazing! Thanks a lot for the workaround!

retlehs commented 2 years ago

resolved as of newer bud (#3074)