Let's follow these steps to replace our full Font-Awesome icon font dependency with an automatically generated custom icon font that only includes the icons we are using:
- First, we will need to create a new configuration file for webfonts-loader that will define a new font we will want it to build. We'll create a new /src/font-awesome.font.js configuration file, that is, a simple Node.js module that we will need to import into our WebPack build. It defines where all the files that make up our custom font live, what font file formats to export, what the name of the font will be, and even what template to use for generating the CSS that imports it:
module.exports = { "files": [ "../node_modules/font-awesome-svg-png/white/svg/spinner.svg" ...