Skip to content

Commit

Permalink
Upgrade and fix config for favicon plugin
Browse files Browse the repository at this point in the history
* Icons again generated for expected platforms.
+ Fixes #22
  • Loading branch information
amcclain committed Feb 26, 2020
1 parent de4ccc5 commit cfffc40
Show file tree
Hide file tree
Showing 4 changed files with 422 additions and 444 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# Changelog

## 5.0.0-SNAPSHOT - under development
## 4.4.1 - 2020-02-26

[Commit Log](https://github.com/xh/hoist-dev-utils/compare/v4.4.0...develop)
### 🐞 Bug Fixes

* Fixed favicon generation with upgrade of plugin - generated HTML again includes tags for correctly
sized favicons across a variety of platforms.

### 📚 Libraries

* favicons-webpack-plugin: `1.0 -> 2.1`

[Commit Log](https://github.com/xh/hoist-dev-utils/compare/v4.4.0...v4.4.1)

## 4.4.0 - 2020-02-08

Expand Down
38 changes: 20 additions & 18 deletions configureWebpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,24 +416,6 @@ function configureWebpack(env) {
// See https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),

// Generate favicons from a single source image if provided - injected into HTML generated below
favicon ? new FaviconsWebpackPlugin({
logo: favicon,
prefix: 'icons-[hash:8]/',
icons: {
android: true,
appleIcon: true,
favicons: true,
appleStartup: false,
coast: false,
firefox: false,
opengraph: false,
twitter: false,
yandex: false,
windows: false
}
}) : undefined,

// Generate HTML index pages - one per JS app.
...appNames.map(jsAppName => {
// Exclude all chunk combos not containing this app, which we currently generate as
Expand All @@ -451,6 +433,26 @@ function configureWebpack(env) {
});
}),

// Generate favicons from source image if provided - injected into generated HTML.
favicon ? new FaviconsWebpackPlugin({
logo: favicon,
prefix: 'icons-[hash:8]/',
inject: true,
mode: 'webapp',
favicons: {
icons: {
android: true,
appleIcon: true,
appleStartup: false,
coast: false,
favicons: true,
firefox: false,
windows: true,
yandex: false
}
}
}) : undefined,

// Support an optional post-build/run interactive treemap of output bundles and their sizes / contents.
analyzeBundles ? new BundleAnalyzerPlugin({
analyzerMode: 'server'
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@babel/preset-env": "~7.8.4",
"@babel/preset-react": "~7.8.3",
"@types/lodash": "~4.14.149",
"@types/react": "~16.9.19",
"@types/react": "~16.9.23",
"@xh/eslint-config": "~2.2.0",
"autoprefixer": "~9.7.4",
"babel-loader": "~8.0.6",
Expand All @@ -26,23 +26,23 @@
"clean-webpack-plugin": "~3.0.0",
"css-loader": "~3.4.2",
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"favicons-webpack-plugin": "~1.0.2",
"favicons-webpack-plugin": "~2.1.0",
"file-loader": "~5.0.2",
"html-webpack-plugin": "~3.2.0",
"lodash": "~4.17.15",
"mini-css-extract-plugin": "~0.9.0",
"node-sass": "~4.13.1",
"postcss-flexbugs-fixes": "~4.2.0",
"postcss-loader": "~3.0.0",
"rimraf": "~3.0.1",
"rimraf": "~3.0.2",
"sass-loader": "~8.0.2",
"sass-material-colors": "~0.0.5",
"style-loader": "~1.1.3",
"terser-webpack-plugin": "~2.3.4",
"terser-webpack-plugin": "~2.3.5",
"url-loader": "~3.0.0",
"webpack": "~4.41.5",
"webpack": "~4.41.6",
"webpack-bundle-analyzer": "~3.6.0",
"webpack-cli": "~3.3.10",
"webpack-cli": "~3.3.11",
"webpack-dev-server": "~3.10.3",
"webpackbar": "~4.0.0"
}
Expand Down
Loading

0 comments on commit cfffc40

Please sign in to comment.