File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
import fs from 'node:fs'
5
5
import path from 'node:path'
6
+ import url from 'node:url'
7
+
8
+ const __dirname = path . dirname ( url . fileURLToPath ( import . meta. url ) )
6
9
7
10
const toAbsolute = ( p ) => path . resolve ( __dirname , p )
8
11
9
- const manifest = ( await import ( './dist/static/ssr-manifest.json' ) ) . default
12
+ const manifest = JSON . parse (
13
+ fs . readFileSync ( toAbsolute ( 'dist/static/ssr-manifest.json' ) , 'utf-8' )
14
+ )
10
15
const template = fs . readFileSync ( toAbsolute ( 'dist/static/index.html' ) , 'utf-8' )
11
16
const { render } = await import ( './dist/server/entry-server.js' )
12
17
Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ export async function createServer(
19
19
: ''
20
20
21
21
const manifest = isProd
22
- ? // @ts -ignore
23
- ( await import ( './dist/client/ssr-manifest.json' ) ) . default
22
+ ? JSON . parse (
23
+ fs . readFileSync ( resolve ( 'dist/client/ssr-manifest.json' ) , 'utf-8' )
24
+ )
24
25
: { }
25
26
26
27
const app = express ( )
You can’t perform that action at this time.
0 commit comments