html: use favicon.prod.ico for production server
This commit is contained in:
parent
14007de208
commit
ffa2731e0e
@ -2,3 +2,7 @@
|
||||
NEXT_PUBLIC_COLOR_PRIMARY=#1C01A9
|
||||
NEXT_PUBLIC_COLOR_SECONDARY=#3A0185
|
||||
NEXT_PUBLIC_COLOR_TERTIARTY=#580161
|
||||
|
||||
|
||||
####### ICONS ########
|
||||
NEXT_PUBLIC_FAVICON=favicon.prod.ico
|
||||
@ -7,11 +7,13 @@ export default class MyDocument extends Document {
|
||||
const originalRenderPage = ctx.renderPage;
|
||||
|
||||
try {
|
||||
ctx.renderPage = () => originalRenderPage({
|
||||
ctx.renderPage = () =>
|
||||
originalRenderPage({
|
||||
enhanceApp: (App) => (props) => sheet.collectStyles(<App {...props} />),
|
||||
});
|
||||
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
|
||||
return {
|
||||
...initialProps,
|
||||
styles: (
|
||||
@ -46,7 +48,7 @@ export default class MyDocument extends Document {
|
||||
|
||||
<link
|
||||
rel="icon"
|
||||
href={process.env.NODE_ENV === 'production' ? 'favicon.prod.ico' : 'favicon.ico'}
|
||||
href={process.env.NEXT_PUBLIC_FAVICON || 'favicon.ico'}
|
||||
crossOrigin="use-credentials"
|
||||
/>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user