Bud 6.3.2 (without SAGE) - URLs for images/svgs/fonts not resolving correctly

updated to 6.3.2 - however image paths in SASS like background-image:url(../../images/wave-green.svg); still can not be resolved when running build.


  • bud.js 6.3.2
  • windows 11
  • WSL2 (Ubuntu)
  • URLs http://localhost/example/ and/or http://example.localhost/

Sidenote: if using sage10, I do not have this issue when building.

I am not using @src or @images because this does not seem to work for me for some reason. Do i need to use aliases for this to work with Bud consistently?

file structure in a nutshell is the following:
– …
– src
– --fonts
– --images
– --styles
– --scripts
– bud.config.js
– index.php

it always seems to add “components” infront. Module not found: Error: Can't resolve './components/@source/src/images/wave-red.svg' in './src/styles'

Not sure if this is just displayed, or actually what it’s looking for.

Using .setPublicPath() i get the following results with different paths (command npm run dist):

  1. / => https://example.com/css/<file>
  2. /wp-content/themes/example/dist/ => https://example.com/wp-content/themes/example/dist/wp-content/themes/example/dist/css/<file>
  3. “” (empty string) => https://example.com/wp-content/themes/example/distcss/<file>
  4. ../ => https://example.com/wp-content/themes/example/dist../css/<file>
  5. ./ => https://example.com/wp-content/themes/example/dist./css/<file>

Any other things I can try?

Running yarn dev with HMR actually works. So it’s surprising that it does not work when built.