Release 5.0.0-rc4

This commit is contained in:
robmadole
2017-10-27 15:45:27 -05:00
committed by Rob Madole
parent 69bf7f96a1
commit 763666f11d
2235 changed files with 3433 additions and 622 deletions

View File

@@ -48,6 +48,22 @@ how imports will work.
* `fa-facebook` becomes `import { faFacebookF } from '@fortawesome/fontawesome-free-brands'` (it's in the Brands style and this was renamed to facebook-f)
* `fa-freebsd` becomes `import { faFreebsd } from '@fortawesome/fontawesome-free-brands'` (OCD-warning: we know it's FreeBSD but consistency/guessability is the goal here)
## Alternative imports
Using `import { faAddressBook } from '@fortawesome/fontawesome-free-solid'` is great if you are using Webpack 2+ or Rollup which supports tree-shaking.
However if you cannot use this feature you can do the following to achieve the same result:
```javascript
import faUser from '@fortawesome/fontawesome-free-solid/faUser'
```
Or using `require`:
```javascript
var faUser = require('@fortawesome/fontawesome-free-solid/faUser')
```
## Configuration
Font Awesome 5 has several configuration options that affect how the library operates.
@@ -515,3 +531,15 @@ Harris the concept of tree shaking attempts to eliminate any unused code. Webpac
FontAwesome.js supports tree shaking and the design of the icon system encourages only importing those icons that you need.
This can result in significantly reduce the bundle size.
If you can't use tree-shaking an alternative is to import the icons like this:
```javascript
import faUser from '@fortawesome/fontawesome-free-solid/faUser'
```
Or using `require`:
```javascript
var faUser = require('@fortawesome/fontawesome-free-solid/faUser')
```