This commit is contained in:
soupette 2019-08-23 11:11:40 +02:00
parent e9e1bf5100
commit a0215fbf58
3 changed files with 14 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import Helmet from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { get, upperFirst } from 'lodash';
import { auth } from 'strapi-helper-plugin';
import favicon from '../../favicon.ico';
import useFetch from './hooks';
import {
@ -100,7 +101,12 @@ const HomePage = ({ global: { plugins }, history: { push } }) => {
return (
<>
<FormattedMessage id="HomePage.helmet.title">
{title => <Helmet title={title} />}
{title => (
<Helmet
title={title}
link={[{ rel: 'icon', type: 'image/png', href: favicon }]}
/>
)}
</FormattedMessage>
<Container className="container-fluid">
<div className="row">

View File

@ -10,6 +10,7 @@ import { get } from 'lodash';
import Helmet from 'react-helmet';
import { BlockerComponent } from 'strapi-helper-plugin';
import favicon from '../../favicon.ico';
import { LOGIN_LOGO } from '../../config';
import ErrorBoundary from '../ErrorBoundary';
@ -46,7 +47,10 @@ export function PluginDispatcher(props) {
return (
<div>
<Helmet title={`Strapi - ${name}`} />
<Helmet
title={`Strapi - ${name}`}
link={[{ rel: 'icon', type: 'image/png', href: favicon }]}
/>
<ErrorBoundary>
<PluginEntryComponent
{...props}

View File

@ -193,7 +193,7 @@ module.exports = ({
use: 'file-loader',
},
{
test: /\.(jpg|png|gif)$/,
test: /\.(jpg|png|gif|ico)$/,
loaders: [
require.resolve('file-loader'),
{
@ -241,7 +241,7 @@ module.exports = ({
new HtmlWebpackPlugin({
inject: true,
template: path.resolve(__dirname, 'index.html'),
favicon: path.resolve(__dirname, 'admin/src/favicon.ico'),
// favicon: path.resolve(__dirname, 'admin/src/favicon.ico'),
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(