You’re not receiving notifications from this thread.
How do I include FontAwesome Pro in a Rails 7 project?
I own a license to FA Pro, and I want to use it in a new Rails 7 project. It doesn't look like I can do an importmap include of the pro font awesome, or if so, I'm doing it wrong. So I downloaded the latest build and dropped it into my vendors folder.
But I can't figure out what I need to do to be able to use these classes. I tried a stylesheet link tag to the vendors folder (and kept trying various paths for the subfolders). I tried adding it to my manifest, but I can't seem to reference it in my SCSS imports.
Ideally, I'd like to link to the vendor'ed fontawesome all.min.css separately in my layout, rather than include it in my application CSS. But I'm having a heck of a time figuring out how to add it properly.
I realized just now that I can use the Pro CDN for font awesome directly. But, I'm going to leave this question open in case someone knows how to solve this, so I have it for another day, or if I decide to serve FA myself.
I think if you are using "importmap" you can pin your vendor asset like the documentation said https://github.com/rails/importmap-rails
import React from "/Users/DHH/projects/basecamp/node_modules/react"
import React from "./node_modules/react"
import React from "https://ga.jspm.io/npm:email@example.com/index.js"
pin "react", to: "https://ga.jspm.io/npm:firstname.lastname@example.org/index.js"
means "everytime you see import React from "react" change it to import React from "https://ga.jspm.io/npm:email@example.com/index.js""
import React from "react"
// => import React from "https://ga.jspm.io/npm:firstname.lastname@example.org/index.js"