I have successfully installed Ionicons in Angular 9 by running npm install --save [email protected]. In order to use them, I imported them into my styles.scss file as shown below:
$ionicons-font-path: "~ionicons/dist/fonts";
@import "~ionicons/dist/scss/ionicons.scss";
While everything functions correctly, the lighthouse score indicates that it significantly impacts page load speed. When importing a Google font in my index.html file, I typically include the following lines (note that preconnect and preload provide similar results):
<link rel="preconnect" as="font" href="https://fonts.googleapis.com/css?family=Work+Sans:400,600&display=swap"
type="font/eot" crossorigin />
How can I achieve the same optimization for a library imported from node_modules? Your assistance is greatly appreciated.