my config (tidied)
// next.config.js
import HtmlWebpackPlugin from 'html-webpack-plugin';
import FaviconsWebpackPlugin from 'favicons-webpack-plugin';
module.exports = {
webpack: (config, { dev }) => {
config.plugins.push(
new FaviconsWebpackPlugin({
logo: './static/assets/images/favicon.png',
inject: true,
}),
new HtmlWebpackPlugin(),
);
return config;
},
};
// pages/_document.js
import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
export default class SmediaDocument extends Document {
render() {
return (
<html lang="en">
<Head>
<meta charSet="utf-8" />
<meta content="IE=edge" httpEquiv="X-UA-Compatible" />
<meta content="width=device-width,initial-scale=1" name="viewport" />
<title>Schoenwald.media</title>
<meta name="description" content="Thoughts on CSS, JS, and overall clean code." />
</Head>
<body>
<Main />
<NextScript />
</body>
</html>
);
}
}
I'd expect that the favicons-webpack-plugin generates the icons, and the html-webpack-plugin inject it in the <head/> of the page. Which it doesn't.
Steps to Reproduce
- Checkout https://github.com/schoenwaldnils/blog
- Set up
.envfile with
docker-compose up
Environment
| Tech |
Version |
| next |
~4.0.0-beta.4 |
| html-webpack-plugin |
~2.30.1 |
| favicons-webpack-plugin |
0.0.7 |
| node |
8.4.0 |
| OS |
mhart/alpine-node:8.4.0 |
my config (tidied)
I'd expect that the favicons-webpack-plugin generates the icons, and the html-webpack-plugin inject it in the
<head/>of the page. Which it doesn't.Steps to Reproduce
.envfile withdocker-compose upEnvironment