Closed manuelmeurer closed 3 years ago
We should not include all of Font Awesome but only the ones that are really used, to let Webpack shake the 🌲.
Something like this: (copied from another project)
import { config, library, dom } from '@fortawesome/fontawesome-svg-core' import { faMoneyBill as farMoneyBill } from '@fortawesome/pro-regular-svg-icons' import { faCalendarAlt as falCalendarAlt } from '@fortawesome/pro-light-svg-icons' import { faMegaphone as fasMegaphone, faChevronRight as fasChevronRight, faMapMarker as fasMapMarker } from '@fortawesome/pro-solid-svg-icons' // https://fontawesome.com/how-to-use/on-the-web/using-with/turbolinks config.mutateApproach = 'sync' library.add( // Regular farMoneyBill, // Light falCalendarAlt, // Solid fasMegaphone, fasChevronRight, fasMapMarker ) dom.watch()
We should not include all of Font Awesome but only the ones that are really used, to let Webpack shake the 🌲.
Something like this: (copied from another project)