File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { createHash } from 'node:crypto'
2
- import path from 'node:path'
3
2
import { expect , test } from '@playwright/test'
4
3
import { type Fixture , useFixture } from './fixture'
5
4
import { expectNoReload , testNoJs , waitForHydration } from './helper'
5
+ import { readFileSync } from 'node:fs'
6
6
7
7
test . describe ( 'dev-default' , ( ) => {
8
8
const f = useFixture ( { root : 'examples/react-router' , mode : 'dev' } )
@@ -74,8 +74,11 @@ function defineTest(f: Fixture) {
74
74
. evaluateAll ( ( elements ) =>
75
75
elements . map ( ( el ) => el . getAttribute ( 'href' ) ) ,
76
76
)
77
- const { default : manifest } = await import (
78
- path . resolve ( f . root , 'dist/ssr/__vite_rsc_assets_manifest.js' )
77
+ const manifest = JSON . parse (
78
+ readFileSync (
79
+ f . root + '/dist/ssr/__vite_rsc_assets_manifest.js' ,
80
+ 'utf-8' ,
81
+ ) . slice ( 'export default ' . length ) ,
79
82
)
80
83
const hashString = ( v : string ) =>
81
84
createHash ( 'sha256' ) . update ( v ) . digest ( ) . toString ( 'hex' ) . slice ( 0 , 12 )
You can’t perform that action at this time.
0 commit comments