This works fine locally and displays when running yarn start.
But after running a build yarn build the svg get’s copied over correctly into the dist folder, but it won’t show on our staging site. The URL get’s a cache busting parameter in it: sitedomain/site/web/app/themes/sage/dist/images/loading-icon_464d8967.svg
Which seems wrong to me. Removing this so the URL is as per localhost still doesn’t work: sitedomain/site/web/app/themes/sage/dist/images/loading-icon.svg
The svg is sat in the images folder in dist so I can’t see where the Webpack config has gone wrong. Any help would be appreciated.
Thanks.
Hey @knowler. Thanks for looking into this.
I can confirm the WP file structure is the same for both Staging and Production.
The publicPath is like so:
"publicPath": "/site/web/app/themes/sage",
And the resulting file path in the css on our Staging instance is here:
Your public path should reflect the path to the theme relative to the document root. For a Bedrock install that would be /app/themes/<name-of-your-theme>; you don’t need /site/web.