I am attempting to add a favicon to a React-based website that I made using webpack. It has been a total nightmare to add a favicon and I have tried many solutions to no ava
Here is all you need:
new HtmlWebpackPlugin({ favicon: "./src/favicon.gif" })
That is definitely after adding "favicon.gif" to the folder "src".
This will transfer the icon to your build folder and include it in your tag like this . This is safer than just importing with copyWebpackPLugin
copyWebpackPLugin