sebinside / StreamAwesome

Stream Awesome - The Stream Deck Icon Generator using Font Awesome
MIT License
52 stars 15 forks source link

Can't find .css files with Font Awesome 6 Free #248

Open z1glr opened 1 month ago

z1glr commented 1 month ago

I'm (still) experiencing a similar problem as in https://github.com/sebinside/StreamAwesome/issues/207

[plugin:vite:import-analysis] Failed to resolve import "../fonts/fontawesome/css/sharp-light.min.css" from "src/main.ts". Does the file exist?

Somehow the checks implemented by https://github.com/sebinside/StreamAwesome/pull/208 don't seem to work. I tried changing the fontAwesomeVersionInfo object in model/versions.ts to

fontAwesomeVersionInfo = {
  fontFamilyBase: 'Font Awesome 6',
  fontVersion: '6.6.0',
  fontLicense: 'Free'
}

but this doesn't help either. Replacing the if-statement in main.ts with

...
if (false) {
...

does work however.

Reproduce

  1. Delete the fonts/fontawesome folder
  2. Download font awesome free for web Download
  3. Paste in the folders as stated in the README
  4. npm run dev
sebinside commented 3 weeks ago

Yes, @DerArkeN with #208 fixed this but caused the final non-debug build to fail as the files are included dynamically and thus not considered by the build. There are ways to statically force folders to be included in the build, however, I was not able to get it working prior to releasing v3, so I partially reverted it.

Nevertheless, I am still interested in a version that defaults to the Free version if the pro files are not included. So everyone is invited to have look at it. I failed in, e.g., altering the vite config file to include the folders no matter what, when running npm run build.