File tree Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+ import Document , {
3
+ Html ,
4
+ Head ,
5
+ Main ,
6
+ NextScript ,
7
+ DocumentContext ,
8
+ } from "next/document" ;
9
+
10
+ class MyDocument extends Document {
11
+ static async getInitialProps ( ctx : DocumentContext ) {
12
+ const initialProps = await Document . getInitialProps ( ctx ) ;
13
+ return { ...initialProps } ;
14
+ }
15
+
16
+ render ( ) {
17
+ return (
18
+ < Html >
19
+ < Head >
20
+ < link rel = "shortcut icon" type = "image/x-icon" href = "/favicon.ico" />
21
+ </ Head >
22
+ < body >
23
+ < Main />
24
+ < NextScript />
25
+ </ body >
26
+ </ Html >
27
+ ) ;
28
+ }
29
+ }
30
+
31
+ export default MyDocument ;
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ async function main() {
56
56
await middleware . installSession ( app ) ;
57
57
await middleware . installPassport ( app ) ;
58
58
await middleware . installLogging ( app ) ;
59
- // These are our assets: images/etc; served out of the /client/ public folder
59
+ // These are our assets: images/etc; served out of the /@app/server/ public folder (if present)
60
60
await middleware . installSharedStatic ( app ) ;
61
61
if ( isTest || isDev ) {
62
62
await middleware . installCypressServerCommand ( app ) ;
Original file line number Diff line number Diff line change 1
1
import { static as staticMiddleware , Application } from "express" ;
2
2
3
3
export default ( app : Application ) => {
4
- app . use ( staticMiddleware ( `${ __dirname } /../public` ) ) ;
4
+ app . use ( staticMiddleware ( `${ __dirname } /../../ public` ) ) ;
5
5
} ;
You can’t perform that action at this time.
0 commit comments