I had a look at your github issue post (and appreciate your exhaustive notes). Adding .setPublicPath("../") seems to have worked!
For reference then my bud.config.js (before adding your fix) is below. It’s pretty much out-of-the-box.
/**
* @typedef {import('@roots/bud').Bud} bud
*
* @param {bud} app
*/
module.exports = async (app) => {
app
/**
* Application entrypoints
*
* Paths are relative to your resources directory
*/
.entry({
app: ["@scripts/app", "@styles/app"],
editor: ["@scripts/editor", "@styles/editor"],
})
/**
* These files should be processed as part of the build
* even if they are not explicitly imported in application assets.
*/
.assets("images")
/**
* These files will trigger a full page reload
* when modified.
*/
.watch("resources/views/**/*", "app/**/*")
/**
* Target URL to be proxied by the dev server.
*
* This should be the URL you use to visit your local development server.
*/
.proxy("http://<name>.local:<port>")
/**
* Development URL to be used in the browser.
*/
.serve("http://127.0.0.1:<port>.");
};
I’m not familiar at all with the workings of bud but noticed in the docs for bud.setPublicPath there is mention of the public path being different in different environments (which makes sense). Do you know if setting .setPublicPath("../") will have problems in say production?
Please don’t set a public path like that. The proper solution to this is to actually set the public path. This is now a requirement moving forward in Sage 10, and was always required in Sage 9. See the PR or the latest Bud config in Sage 10 for an example, along with the Bud release notes for further information.
/**
* URI of the `public` directory
*/
.setPublicPath("/app/themes/sage/public/");