0

I'm in the process of updating my Rails app to version 7. As part of this, I've removed Webpacker and am trying to move my whole assets solution to the new jsbundling-rails and cssbundling-rails gems. So far it's working really nicely and is a lot simpler.

One of the things that does not appear to be working are images referenced in CSS files that are a part of a 3rd party library such as Photoswipe.

The library itself works but the images fail. Photoswipe includes a SCSS variable for the path to the skin and when I was using Webpack I had this line set as below:

$pswp__assets-path: "../../../node_modules/photoswipe/src/css/default-skin/"; // path to skin assets folder (preloader, PNG and SVG sprite)

This is now failing, I've tried soooo many combinations of things but I cannot for the life of me seem to be able to get those images working.

This is not just a Photoswipe issue, it's happening in a number of other libraries where images are being referenced.

Any suggestions?

rctneil
  • 7,016
  • 10
  • 40
  • 83

0 Answers0