Something not working with the Javascript API? Here are some common snags and how to get yourself out of trouble.


Tree-shaking isn't working or performing slowly

More detailed information about tree-shaking can be found here.

For most bundler tools tree-shaking only works well if you are using an ES module. The Font Awesome API and all the components we provide are available in ES modules. If you have problems configuring your tool it probably means that Webpack or Rollup is not using ES modules from the node_modules directory. This can be a bit of of black hole to fix and we recommend you go with the simpler import method. We're not trying to tell you what to do we just hate to watch you beat yourself in the face with a hammer.

These two import methods are identical:

import { faUser } from '@fortawesome/free-solid-svg-icons'
import { faUser } from '@fortawesome/free-solid-svg-icons/faUser'

The benefit of using @fortawesome/free-solid-svg-icons/faUser is that it bypasses tree-shaking altogether and simply imports a submodule.

What if I need help with something else?

You can always check our support docs or ask our community (opens new window) if anyone has experience with or guidance for your situation. If you think you've spotted a bug, we'd love to know. If you want or need a feature we don't have yet, we want to know that too - let us know!

You're viewing the Version 6 Beta

It's all the awesome of 5, but now more six-y! Version 6 brings over 13,000 icons across 5 styles – including the new Thin style! – and includes more and faster services.

Get the Deets on Version 6

Head Back to Our Current Version 5 Release

Need a Hand?

If you’re stuck or have a question, check our Troubleshooting docs, all of the Font Awesome threads on Stack Overflow, or contact our community on GitHub.

Or get Real Human Support™ with a Pro Subscription!