npm install font-awesome --save-dev
configure webpack.config.js
module: { loaders: [ { test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/, use: [{ loader: 'file-loader', options: { name: '[name].[ext]', outputPath: 'fonts/', // output directory publicPath: '../' // override default directory } }] } ] }
After editing, the fonts folder
appears in the directory, and a reference is added to the entry file
require('font-awesome/css/font-awesome.css');