Skip to content

Commit

Permalink
Added favicon and HTML minification in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Sisley committed Jul 29, 2018
1 parent efa70d1 commit 6bfa97b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/config/webpack.shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const HtmlWebPackPlugin = require('html-webpack-plugin');
const clientDist = path.join(__dirname, '../../dist/client');
const nodeModules = path.join(__dirname, '../../node_modules');
const clientIndexHtml = path.join(__dirname, '../../src/client/index.html');
const favicon = path.join(__dirname, '../../src/client/favicon.png');

const { NODE_ENV } = process.env;
const isPrd = NODE_ENV === 'production';
Expand Down Expand Up @@ -76,6 +77,13 @@ module.exports = {
htmlWebPackPlugin: new HtmlWebPackPlugin({
template: clientIndexHtml,
filename: './index.html',
minify: isPrd
? {
collapseWhitespace: true,
}
: false,
hash: isPrd,
favicon,
}),
},

Expand Down
Binary file added src/client/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6bfa97b

Please sign in to comment.