Add favicon webpack plugin
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
// development config
|
||||
const merge = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
|
||||
const commonConfig = require('./common');
|
||||
|
||||
module.exports = merge(commonConfig, {
|
||||
@@ -17,6 +19,21 @@ module.exports = merge(commonConfig, {
|
||||
},
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
plugins: [
|
||||
new FaviconsWebpackPlugin({
|
||||
logo: './assets/img/favicon.png',
|
||||
icons: {
|
||||
android: false,
|
||||
appleIcon: false,
|
||||
appleStartup: false,
|
||||
coast: false,
|
||||
favicons: true,
|
||||
firefox: false,
|
||||
opengraph: false,
|
||||
twitter: false,
|
||||
yandex: false,
|
||||
windows: false
|
||||
}
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(), // enable HMR globally
|
||||
new webpack.NamedModulesPlugin(), // prints more readable module names in the browser console on HMR updates
|
||||
],
|
||||
|
||||
@@ -4,6 +4,7 @@ const path = require('path')
|
||||
const resolve = path.resolve;
|
||||
const DynamicCdnWebpackPlugin = require('dynamic-cdn-webpack-plugin');
|
||||
const PrerenderSPAPlugin = require('prerender-spa-plugin');
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
|
||||
/* NOTE: This is a list of all routes that are prerendered for production use.
|
||||
Please list all routes that contain search engine accessible content, i.e.,
|
||||
@@ -22,6 +23,21 @@ module.exports = merge(commonConfig, {
|
||||
},
|
||||
devtool: 'source-map',
|
||||
plugins: [
|
||||
new FaviconsWebpackPlugin({
|
||||
logo: './assets/img/favicon.png',
|
||||
icons: {
|
||||
android: true,
|
||||
appleIcon: true,
|
||||
appleStartup: true,
|
||||
coast: true,
|
||||
favicons: true,
|
||||
firefox: true,
|
||||
opengraph: true,
|
||||
twitter: true,
|
||||
yandex: true,
|
||||
windows: true
|
||||
}
|
||||
}),
|
||||
new DynamicCdnWebpackPlugin(),
|
||||
new PrerenderSPAPlugin({
|
||||
// Required - The path to the webpack-outputted app to prerender.
|
||||
|
||||
Reference in New Issue
Block a user