Skip to content

Commit 2f5e0ab

Browse files
Igor BiryukovSmoren
authored andcommitted
Reduced @fortawesome/free-solid-svg bundle from 1mb to 1kb
1 parent adbf94f commit 2f5e0ab

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ import { library } from '@fortawesome/fontawesome-svg-core';
4444
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
4545

4646
/* import specific icons */
47-
import { faSearch, faXmark } from '@fortawesome/free-solid-svg-icons';
47+
import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch';
48+
import { faXmark } from '@fortawesome/free-solid-svg-icons/faXmark';
4849

4950
export {
5051
HiveAutocomplete,

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { library } from '@fortawesome/fontawesome-svg-core';
1111
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
1212

1313
/* import specific icons */
14-
import { faSearch, faXmark } from '@fortawesome/free-solid-svg-icons';
14+
import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch';
15+
import { faXmark } from '@fortawesome/free-solid-svg-icons/faXmark';
1516

1617
/* add icons to the library */
1718
library.add(faSearch, faXmark);

0 commit comments

Comments
 (0)