Add favicons

This commit is contained in:
Tristan Maat 2018-05-29 00:56:10 +00:00
parent 8166ee99ec
commit 325175525b
3 changed files with 4 additions and 1 deletions

View file

@ -13,6 +13,7 @@
"clean-webpack-plugin": "^0.1.19", "clean-webpack-plugin": "^0.1.19",
"css-loader": "^0.28.11", "css-loader": "^0.28.11",
"exports-loader": "^0.7.0", "exports-loader": "^0.7.0",
"favicons-webpack-plugin": "^0.0.9",
"file-loader": "^1.1.11", "file-loader": "^1.1.11",
"html-loader": "^0.5.5", "html-loader": "^0.5.5",
"html-webpack-plugin": "^3.1.0", "html-webpack-plugin": "^3.1.0",

BIN
src/lib/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -4,6 +4,7 @@ const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin"); const CleanWebpackPlugin = require("clean-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
const PAGE_DIR = path.resolve(__dirname, "src", "pages"); const PAGE_DIR = path.resolve(__dirname, "src", "pages");
@ -32,7 +33,8 @@ module.exports = {
$: "jquery", $: "jquery",
jQuery: "jquery" jQuery: "jquery"
}), }),
new MiniCssExtractPlugin() new MiniCssExtractPlugin(),
new FaviconsWebpackPlugin(path.resolve(__dirname, "src", "lib", "favicon.png"))
].concat(pages.map(page => new HtmlWebpackPlugin(page))), ].concat(pages.map(page => new HtmlWebpackPlugin(page))),
module: { module: {
rules: [ rules: [