font_awesome5_rails icon indicating copy to clipboard operation
font_awesome5_rails copied to clipboard

Getting 'Cant find stylesheet to import' after new JSBundling Rails 7 install

Open jasonfb opened this issue 2 years ago • 1 comments

In the "Install with webpack" section could you please clarify the sentence on the README "Next import font in your app/javascript/packs/application.js. You can find more about import in FA pages."

(Please note that I am actually attempting to install this with JSBundling, not webpacker)

Alternatively, please add a section for "Install with JSBundling" instead of webpack.

I searched the (very large and general) FA docs and can find nothing that seems to fit for Rails. Specifically, if you follow the README instructions for a JSBundling app, I get this result:

Screen Shot 2022-11-25 at 10 04 29 PM

my app/assets/stylesheets/application.scss has this:

@import 'bootstrap/scss/bootstrap';
@import 'bootstrap-icons/font/bootstrap-icons';
@import 'font_awesome5_webfont';

The readme says "Next import font in your app/javascript/packs/application.js" (note that in Rails 7 the location is now app/javascript/application.js). This is the part that I'm stuck on. I tried various ways to import font awesome here but I couldn't get any to work.

Can you please clarify the documentation here?

I would suggest removing the link to the general docs because the link only goes to the general docs home page and the information to solve this setup step is not easily identifiable or accessible if you don't already know it.

jasonfb avatar Nov 26 '22 03:11 jasonfb