@@ -9,6 +9,54 @@ export type HtmlProps = {
9
9
reduxState : any ;
10
10
} ;
11
11
12
+ /*
13
+ <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
14
+ <link rel="apple-touch-icon" sizes="152x152" href="%PUBLIC_URL%/favicons/apple-icon-152x152.png"/>
15
+ <link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/favicons/apple-icon-180x180.png"/>
16
+ <link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/favicons/android-icon-192x192.png"/>
17
+ <link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicons/favicon-32x32.png"/>
18
+ <link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favicons/favicon-96x96.png"/>
19
+ <link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicons/favicon-16x16.png"/>
20
+ */
21
+
22
+ const favicons = [
23
+ { rel : 'shortcut icon' , path : '/favicon.ico' } ,
24
+ {
25
+ rel : 'apple-touch-icon' ,
26
+ sizes : '152x152' ,
27
+ path : '/favicons/apple-icon-152x152.png' ,
28
+ } ,
29
+ {
30
+ rel : 'apple-touch-icon' ,
31
+ sizes : '180x180' ,
32
+ path : '/favicons/apple-icon-180x180.png' ,
33
+ } ,
34
+ {
35
+ rel : 'icon' ,
36
+ type : 'image/png' ,
37
+ sizes : '192x192' ,
38
+ path : '/favicons/favicon-192x192.png' ,
39
+ } ,
40
+ {
41
+ rel : 'icon' ,
42
+ type : 'image/png' ,
43
+ sizes : '32x32' ,
44
+ path : '/favicons/favicon-32x32.png' ,
45
+ } ,
46
+ {
47
+ rel : 'icon' ,
48
+ type : 'image/png' ,
49
+ sizes : '96x96' ,
50
+ path : '/favicons/favicon-96x96.png' ,
51
+ } ,
52
+ {
53
+ rel : 'icon' ,
54
+ type : 'image/png' ,
55
+ sizes : '16x16' ,
56
+ path : '/favicons/favicon-16x16.png' ,
57
+ } ,
58
+ ] ;
59
+
12
60
function Html ( {
13
61
content,
14
62
styledElement,
@@ -23,6 +71,14 @@ function Html({
23
71
{ styledElement }
24
72
{ extractor . getLinkElements ( ) }
25
73
{ extractor . getStyleElements ( ) }
74
+ { favicons . map ( favicon => (
75
+ < link
76
+ key = { favicon . path }
77
+ rel = { favicon . rel }
78
+ sizes = { favicon . sizes }
79
+ href = { process . env . PUBLIC_URL . concat ( favicon . path ) }
80
+ />
81
+ ) ) }
26
82
</ head >
27
83
< body >
28
84
< div id = "root" dangerouslySetInnerHTML = { { __html : content } } > </ div >
0 commit comments