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