FortAwesome
Repos
32

Events

`.es.js` should be renamed `.mjs`

Describe the bug This bug is described fully @ https://github.com/benmosher/eslint-plugin-import/issues/1717

The quick version is that eslint-plugin-import throws some errors reading .es.js files. The fix is to rename the files .mjs which officially indicates they are modules, not common-js style exports.

Expected behavior I expect other libraries to have easy inter-op with fontawesome.

Version and implementation

    "@fortawesome/fontawesome-svg-core": "1.2.28",
    "@fortawesome/free-brands-svg-icons": "5.13.0",
    "@fortawesome/free-regular-svg-icons": "5.13.0",
    "@fortawesome/free-solid-svg-icons": "5.13.0",
    "@fortawesome/react-fontawesome": "0.1.9",

Bug report checklist

  • [x] I have filled out as much of the above information as I can
  • [-] I have included a test case because my odds go way up that the team can fix this when I do
  • [x] I have searched for existing issues and to the best of my knowledge this is not a duplicate
Created at 50 seconds ago
v6 Named export 'faDiscord' not found

Describe the bug

"@fortawesome/fontawesome-svg-core": "1.3.0",
"@fortawesome/free-brands-svg-icons": "6.0.0",
"@fortawesome/free-solid-svg-icons": "6.0.0",
"@fortawesome/vue-fontawesome": "3.0.0-5",

Vue 3

<script setup lang="ts">
import { faDiscord, faPatreon, faTwitter } from '@fortawesome/free-brands-svg-icons'

[...]

<FontAwesomeIcon :icon="faDiscord" />

Oddly it works during development, just not build (using Vite)

import { faSteamSymbol, faDiscord, faTwitter, faPatreon } from "@fortawesome/free-brands-svg-icons";
                        ^^^^^^^^^
SyntaxError: Named export 'faDiscord' not found. The requested module '@fortawesome/free-brands-svg-icons' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@fortawesome/free-brands-svg-icons';
const { faSteamSymbol, faDiscord, faTwitter, faPatreon } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)

Screenshots

  • [x] SVG with JS
  • [ ] Web Fonts with CSS
  • [ ] SVG Sprites
  • [ ] On the Desktop

Bug report checklist

  • [x] I have filled out as much of the above information as I can
  • [ ] I have included a test case because my odds go way up that the team can fix this when I do
  • [x] I have searched for existing issues and to the best of my knowledge this is not a duplicate
Created at 1 minute ago
Feature Request: Provide ESM exports

Is your feature request related to a problem? Please describe.

It should be easy for ESM projects, and projects using Webpack tree shaking (et al) to use Font Awesome in a pure ESM way.

Describe the solution you'd like

Each @fortawesome package should, like material-ui currently does, provide an esm folder where each source file exposes its exports using standard ESM syntax.

Describe alternatives you've considered

None, this needs to happen at compile time.

Additional context

Since the JS ecosystem at large is moving towards ESM as a standard, providing this would also create an easy crossover path for projects moving in that direction and using Font Awesome.

Feature request checklist

  • [x ] This is a single feature (i.e. not a re-write of all of Font Awesome)
  • [x ] The title starts with "Feature request: " and is followed by a clear feature name (Ex: Feature request: moar cowbell)
  • [ x] I have searched for existing issues and to the best of my knowledge this is not a duplicate
Created at 1 minute ago
issue comment
package doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

Any chance to provide a reproducible test case?

Please provide as many information as possible (version of FA, how it is imported, version of Vite). Even better if it is possible to provide a reduced test case hosted on github

Created at 2 minutes ago
Created at 9 minutes ago
issue comment
package doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.

I am also on 6.2.0 and seeing the same warning. Please reopen this issue

Created at 1 hour ago
Created at 1 hour ago
Created at 2 hours ago
Created at 4 hours ago
Created at 5 hours ago
Subsetter linux version

We have been using Font Awesome for several years.

We are using version v5.15.4, and are interested in upgrading to v6, but would like to keep the size of the file to a minimum. To do so, we are considering using the Subsetter app.

Unfortunately, by policy, we are limited to using Linux software exclusively.

¿Is there a Linux version development being considered in the near future?. ¿Would you be able to provide a workaround for making subsetting possible in Linux? Perhaps a command line tool.

For now we'll continue to use v5 for as long as possible, until we are able to make this subsetting work with version 6.

Thank you, Regards

Created at 10 hours ago
Created at 13 hours ago
Created at 15 hours ago
issue comment
Feature request: improve Font Awesome Pro Subsetter usability

Thanks @MrUpsidown . Appreciate you taking the time to send this in. We'll put this on the list to think through.

Created at 16 hours ago
Created at 17 hours ago
issue comment
Bug: Defining icons from strings in React works, but there is always the 'Could not find icon' error message

Hey @tm1000 and @Stephcraft !

What happens if you change the code to this:

import { fas } from '@fortawesome/free-solid-svg-icons'
import { far } from '@fortawesome/free-regular-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons'

const { library  } = require("../../node_modules/@fortawesome/fontawesome-svg-core")

library.add(fab)
library.add(fas)
library.add(far)
Created at 19 hours ago
Created at 20 hours ago
issue comment
Icon request: cracked-egg

Indeed, it's the upper part or say, the overall shape that is IMO too triangular. Thanks.

Created at 20 hours ago
Created at 1 day ago
issue comment
Bug: use macros but

I was able to get results using create react app, I think the webpack configuration may not be right, I have to try it

Created at 1 day ago
Bug: use macros but

Bug description

config: babel-plugin-macros.config.js:

module.exports = {
  'fontawesome-svg-core': {
    license: 'pro', // my team is using the pro version
  },
};

.babelrc:

{
  "presets": [...],
  "plugins": [
    "macros",
     ...
  ]
}

build result:

Module not found: Error: Can't resolve '@babel/helper-module-imports' in '... /node_modules/@fortawesome/fontawesome-svg-core'
Module not found: Error: Can't resolve 'fs' in '... node_modules/babel-plugin-macros/node_modules/resolve/lib'
Module not found: Error: Can't resolve 'module' in '... node_modules/import-fresh/node_modules/resolve-from'
Module not found: Error: Can't resolve 'fs' in '... node_modules/import-fresh/node_modules/resolve-from'

if chang webpack config:

...
    fallback: {
      fs: false,
      module: false,
    },
...

error: Module not found: Error: Can't resolve '@babel/helper-module-imports'

run npm i @babel/helper-module-imports build success, but @fortawesome/fontawesome-svg-core/import.macro icon return undefined

Reproducible test case

No response

Screenshots

No response

Font Awesome version

v6.2.0

Serving

Other (as specified in the bug description)

Implementation

Other (as specified in the bug description)

Browser and Operating System

mac os 11.6, chrome 105

Web bug report checklist

  • [ ] I have included a test case because my odds go way up that the team can fix this when I do
  • [X] I have searched for existing issues and to the best of my knowledge this is not a duplicate
Created at 1 day ago
Created at 1 day ago
issue comment
Icons in 6 Pro are randomly janky (scssphp)

Interesting enough, this time around, if I avoid scss entirely and just load in all.css and run a simple str_replace, I'm golden.

    $faCss = \file_get_contents($faDir.'css/all.css');
    $faCss = str_replace('../webfonts/',$faWeb.'webfonts/',$faCss);

That works perfect. Sometimes the simplest option is the best option.

Created at 1 day ago
Icons in 6 Pro are randomly janky (scssphp)

closed because it is a duplicate of #17644


I can't quite explain this one, but it happens randomly using the self-hosted SCSS implementation of Font Awesome 6 Pro. I can go for a few hours without this weird graphic bug occuring. It's totally random, and I can sit and refresh the same page and watch it crop up once every hundred or so refreshes. I'm using Chrome on Win 10

Here's some examples that indicate what's going on better than I could put into words.

| ex01 | ex02 | ex03 | ex04 | | ex11 | ex12 | ex13 | ex14 |

Created at 1 day ago
reopened issue
Icons in 6 Pro are randomly janky (scssphp)

closed because it is a duplicate of #17644


I can't quite explain this one, but it happens randomly using the self-hosted SCSS implementation of Font Awesome 6 Pro. I can go for a few hours without this weird graphic bug occuring. It's totally random, and I can sit and refresh the same page and watch it crop up once every hundred or so refreshes. I'm using Chrome on Win 10

Here's some examples that indicate what's going on better than I could put into words.

| ex01 | ex02 | ex03 | ex04 | | ex11 | ex12 | ex13 | ex14 |

Created at 1 day ago
issue comment
Icons in 6 Pro are randomly janky (scssphp)

Ahh crap, dev and production didn't line up, jumped the gun on the response.

When applying the same set of fixes as last time, I wind up with resulting classes like so

.fa-chart-network::before{content:"f78a"}

but the rendered output results in this image

I've swapped out the fa-content function in _functions.scss to the below

@function fa-content($fa-var) {
  @return unquote("\"") + unquote(str-insert($fa-var, "\\", 1)) + unquote("\"");
}

and have updated _variables.scss

...
$fa-var-fill-drip: "f576";
$fa-var-arrows-to-circle: "e4bd";
$fa-var-circle-chevron-right: "f138";
$fa-var-chevron-circle-right: "f138";
$fa-var-wagon-covered: "f8ee";
$fa-var-line-height: "f871";
$fa-var-bagel: "e3d7";
$fa-var-transporter-7: "e2a8";
$fa-var-at: "40";
...
Created at 1 day ago
Created at 1 day ago
Icons in 6 Pro are randomly janky (scssphp)

closed because it is a duplicate of #17644


I can't quite explain this one, but it happens randomly using the self-hosted SCSS implementation of Font Awesome 6 Pro. I can go for a few hours without this weird graphic bug occuring. It's totally random, and I can sit and refresh the same page and watch it crop up once every hundred or so refreshes. I'm using Chrome on Win 10

Here's some examples that indicate what's going on better than I could put into words.

| ex01 | ex02 | ex03 | ex04 | | ex11 | ex12 | ex13 | ex14 |

Created at 1 day ago
issue comment
Icons in 6 Pro are randomly janky (scssphp)

@tagliala It looks like I got something wrong between fontawesome versions when rewriting the config file. Previously, I had something like this

$file    = $path.'_variables.scss';
$content = \file_get_contents($file);
$data    = explode(PHP_EOL, $content);

foreach($data as $i => $line) {
    if (!str_contains($line, '\\') || !str_contains($line,';')) {
        continue;
    }
    $line = str_replace(';','";',$line);
    $line = str_replace('\\','"',$line);

    $data[$i] = $line;
}

\file_put_contents($file, implode(PHP_EOL, $data);)

Upon changing $line = str_replace('\\','"',$line); to $line = str_replace('\\','"\\',$line); for 6.2, we're good to go again.

Created at 1 day ago