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
Use the file-loader for that:
{
test: /\.(svg|png|gif|jpg|ico)$/,
include: path.resolve(__dirname, path),
use: {
loader: 'file-loader',
options: {
context: 'src/assets',
name: 'root[path][name].[ext]'
}
}
}
I will give simple steps to add favicon :-)
logo.png
Change logo.png
to favicon.ico
Note : when you save it is
favicon.ico
make sure it's notfavicon.ico.png
It might take some time to update
change icon size in manifest.json if you can't wait