We provide more advanced packages that are suitable for more specialized situations. These packages are side-effect free and provide no automatic replacement of
<i> tags to
<svg> tags. (Although it can still be used through
When should you reach for this bad boy?
The SVG core package is helpful and recommended in the following cases:
These are ES6 module compatible for tools that support this, such as Rollup. Our icon content packages also support tree shaking which allows compatible tools to remove icons you are not using from your final build.
Our Basic packages (
@fortawesome/fontawesome-pro) are aimed at individuals who would like to quickly integrate Font Awesome into their projects but do not want to invest the time and effort to understand what's going on under the hood. For this reason a lot of the behavior is automatic and works without any intervention.
In contrast, the
fontawesome-svg-core package is for more specialized situations or for forming the underlying API to power other components or libraries. In fact, our own official components for Vue, React, Ember, and Angular all use the
fontawesome-svg-core package under the hood.
Because of this the core package and the icon content packages avoid doing anything automatic or creating side-effects that make development with them difficult to control or reason.
One of the most common use cases where you would reach for the core package instead of using
fontawesome-pro is to create a subset of icons to reduce your final bundled file size.
For this case you may still want the
<i> tags to be replaced with
<svg> tags. This is the default behavior when using the CDN or
fontawesome-pro packages. This does not happen automatically when using the core package.
To accomplish this we will use the