Skip to content

Commit 022a4a4

Browse files
authored
Add note for tree shaking issue (#252)
1 parent 89fd943 commit 022a4a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ library.add(
264264
);
265265
```
266266

267+
Note: In Ember Classic builds, tree-shaking does not work as expected. This means that all icons from the package may be included in your build, not just the ones you’ve selected. To work around this, you can use direct imports, for example:
268+
`import { faAdjust } from '@fortawesome/pro-light-svg-icons/faAdjust';`
269+
For more information and other known tree-shaking issues, see the [Font Awesome documentation](https://docs.fontawesome.com/apis/javascript/tree-shaking#alternative-to-tree-shaking-deep-imports).
270+
267271
### Glint
268272

269273
Update your template registry to extend this addon. Check the [Glint documentation](https://typed-ember.gitbook.io/glint/environments/ember/using-addons#using-glint-enabled-addons) for more information.

0 commit comments

Comments
 (0)