How to add Fontawesome 5 to Symfony 4 using Webpack Encore

后端 未结 7 1597
鱼传尺愫
鱼传尺愫 2020-12-29 04:34

I want to add Font Awesome 5 to my Symfony 4 project, this is what I did :

  • I added font awesome to my project using yarn : yarn add --dev @fortawesome/f
7条回答
  •  天涯浪人
    2020-12-29 05:13

    You need to install copy-webpack-plugin, please follow below instructions and it'll work for you 1- install the plugin

    yarn add copy-webpack-plugin --dev
    

    2 add following line to your webpack.config.js:

    const CopyWebpackPlugin = require('copy-webpack-plugin');
    

    3: compile

    yarn run encore dev
    

    test the page again it should now show the missing icons

提交回复
热议问题