diff --git a/assets/js/icons.js b/assets/js/icons.js index 5361aa69cb..7e6ff93201 100644 --- a/assets/js/icons.js +++ b/assets/js/icons.js @@ -1,8 +1,27 @@ 'use strict'; -import { fab } from '@fortawesome/free-brands-svg-icons'; -import { far } from '@fortawesome/free-regular-svg-icons'; -import { fas } from '@fortawesome/free-solid-svg-icons'; +// Icons must be imported deeply because Parcel’s tree shaking is shaky. +import { faDiaspora } from '@fortawesome/free-brands-svg-icons/faDiaspora'; +import { faFacebookSquare } from '@fortawesome/free-brands-svg-icons/faFacebookSquare'; +import { faGetPocket } from '@fortawesome/free-brands-svg-icons/faGetPocket'; +import { faTwitter } from '@fortawesome/free-brands-svg-icons/faTwitter'; +import { faWordpressSimple } from '@fortawesome/free-brands-svg-icons/faWordpressSimple'; +import { faCheckCircle as faCheckCircleRegular } from '@fortawesome/free-regular-svg-icons/faCheckCircle'; +import { faStar as faStarRegular } from '@fortawesome/free-regular-svg-icons/faStar'; +import { faTimesCircle } from '@fortawesome/free-regular-svg-icons/faTimesCircle'; +import { faArrowAltCircleDown } from '@fortawesome/free-solid-svg-icons/faArrowAltCircleDown'; +import { faArrowRight } from '@fortawesome/free-solid-svg-icons/faArrowRight'; +import { faCheckCircle } from '@fortawesome/free-solid-svg-icons/faCheckCircle'; +import { faCloudUploadAlt } from '@fortawesome/free-solid-svg-icons/faCloudUploadAlt'; +import { faCog } from '@fortawesome/free-solid-svg-icons/faCog'; +import { faEnvelope } from '@fortawesome/free-solid-svg-icons/faEnvelope'; +import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons/faExternalLinkAlt'; +import { faKey } from '@fortawesome/free-solid-svg-icons/faKey'; +import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch'; +import { faSignOutAlt } from '@fortawesome/free-solid-svg-icons/faSignOutAlt'; +import { faStar } from '@fortawesome/free-solid-svg-icons/faStar'; +import { faSyncAlt } from '@fortawesome/free-solid-svg-icons/faSyncAlt'; +import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'; import { library, dom } from '@fortawesome/fontawesome-svg-core'; import wallabag from '../images/wallabag'; @@ -18,27 +37,27 @@ export default function initIcons() { }; library.add( - fab.faDiaspora, - fab.faFacebookSquare, - fab.faGetPocket, - fab.faTwitter, - fab.faWordpressSimple, - far.faCheckCircle, - far.faStar, - far.faTimesCircle, - fas.faArrowAltCircleDown, - fas.faArrowRight, - fas.faCheckCircle, - fas.faCloudUploadAlt, - fas.faCog, - fas.faEnvelope, - fas.faExternalLinkAlt, - fas.faKey, - fas.faSearch, - fas.faSignOutAlt, - fas.faStar, - fas.faSyncAlt, - fas.faTimes, + faDiaspora, + faFacebookSquare, + faGetPocket, + faTwitter, + faWordpressSimple, + faCheckCircleRegular, + faStarRegular, + faTimesCircle, + faArrowAltCircleDown, + faArrowRight, + faCheckCircle, + faCloudUploadAlt, + faCog, + faEnvelope, + faExternalLinkAlt, + faKey, + faSearch, + faSignOutAlt, + faStar, + faSyncAlt, + faTimes, wallabagIcon );