Hello there!
After you made the fix for my issue and released it on the Bud v6.7.3, I’m trying to make it work on my project but I’m facing some errors I’m not quite understanding.
I also tried this on a new fresh Sage theme and things worked, so this has to do with my project.
Firstly, I upgraded all the Bud dependecies to 6.7.3 (from 6.6.10). dev
and build
work fine.
Then, I added my view path to the bud.entry
:
app.entry({
app: ['@scripts/app.js', '@styles/app.scss'],
index: ['views/partials/home/about']
})
Still, without any changes to the file, dev
and build
work fine.
Then, I tried adding this inside <picture>
to the about.blade.php
file:
<source srcset="@asset('/images/home/about/mobile-about-section.jpg?as=webp')" type="image/webp" media="(max-width: 767px)">
Now, when I run yarn dev
I get this:
/Users/erip2/Documents/my-project/dev/public/app/themes/my-theme/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
yarn build
shows these errors:
✘ sage ./public [8ac304edfa27cb5148e3]
│
├─ ✘ error
│ Can't resolve '/images/home/about/mobile-about-section.jpg) alt={{ __(Homepage about us decorative image' in './resources/views/partials/home'
│
├─ ✘ error
│ Can't resolve '/images/home/about/mobile-about-section.jpg) type=image/jpeg media=(max-width: 767px' in './resources/views/partials/home'
│
├─ ✘ error
│ Cannot read properties of undefined (reading 'get')
│
│
├─ ✘ error
│ Can't find 'webp) type=image/webp media=(max-width: 767px' preset in the 'generator' option
Tell me if more information should be provided (.budfiles
)
Note: The webp generator of bud-imagemin works perfectly for css.