Skip to content

Commit 3fc563d

Browse files
authored
feat: Integrate dynamic favicon generation with Favicons Webpack Plugin (#72)
- **Favicons Plugin Integration**: - Added `favicons-webpack-plugin` to dynamically generate favicons and web app manifests. - Configured plugin to use `src/favicon.png` as the base image. - **Cleanup**: - Removed outdated favicon assets and `manifest.webmanifest`. - Renamed `android-chrome-512x512.png` to `favicon.png` for consistency. - **Webpack Configuration**: - Enabled `FaviconsWebpackPlugin` in `webpack.config.js` with branding details. - Ensured output path and meta configurations align with project requirements. - **Dependencies**: - Updated `package.json` and `package-lock.json` to include `favicons-webpack-plugin` and dependencies. - **SEO Enhancement**: - Improved favicon handling for better browser and PWA support.
1 parent c666349 commit 3fc563d

File tree

10 files changed

+892
-2
lines changed

10 files changed

+892
-2
lines changed

package-lock.json

Lines changed: 877 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"css-loader": "^7.1.2",
2424
"css-minimizer-webpack-plugin": "^7.0.0",
2525
"cssnano-preset-advanced": "^7.0.0",
26+
"favicons-webpack-plugin": "^6.0.1",
2627
"firebase-tools": "^13.0.0",
2728
"glob": "^11.0.0",
2829
"html-inline-css-webpack-plugin": "^1.11.1",
-1.79 KB
Binary file not shown.
-1.61 KB
Binary file not shown.

src/assets/raw/favicon-16x16.png

-214 Bytes
Binary file not shown.

src/assets/raw/favicon-32x32.png

-347 Bytes
Binary file not shown.

src/assets/raw/favicon.ico

-15 KB
Binary file not shown.

src/assets/raw/manifest.webmanifest

Lines changed: 0 additions & 1 deletion
This file was deleted.

webpack.config.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const CopyWebpackPlugin = require('copy-webpack-plugin');
22
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
3-
//const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
3+
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
44
const HtmlMinimizerPlugin = require('html-minimizer-webpack-plugin');
55
const HtmlWebpackPlugin = require('html-webpack-plugin');
66
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
@@ -181,6 +181,19 @@ module.exports = {
181181
lastmod: true,
182182
}
183183
}),
184+
new FaviconsWebpackPlugin({
185+
logo: './src/favicon.png',
186+
mode: 'webapp',
187+
outputPath: ".",
188+
favicons: {
189+
appName: 'Balázs Varga - Professional Profile',
190+
appDescription: "Balázs Varga",
191+
developerName: "Balázs Varga",
192+
developerURL: "https://bvarga.dev",
193+
background: "#fff",
194+
theme_color: "#fff",
195+
}
196+
}),
184197
new HtmlNewLineRemoverPlugin(),
185198
new CspHtmlWebpackPlugin(
186199
{

0 commit comments

Comments
 (0)