npm install fontpreload-webpack-plugin --save-dev
Add this plugin in your webpack config file.
const FontPreloadWebpackPlugin = require('fontpreload-webpack-plugin');
plugins: [
new FontPreloadWebpackPlugin({
rel: 'prefetch', // preload default
fontNameList: ['fontawesome-webfont'],
crossorigin: 'anonymous', // anonymous|use-credentialscredentials|false false default
})
],