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 11import { createHash } from 'node:crypto'
2- import path from 'node:path'
32import { expect , test } from '@playwright/test'
43import { type Fixture , useFixture } from './fixture'
54import { expectNoReload , testNoJs , waitForHydration } from './helper'
5+ import { readFileSync } from 'node:fs'
66
77test . describe ( 'dev-default' , ( ) => {
88 const f = useFixture ( { root : 'examples/react-router' , mode : 'dev' } )
@@ -74,8 +74,11 @@ function defineTest(f: Fixture) {
7474 . evaluateAll ( ( elements ) =>
7575 elements . map ( ( el ) => el . getAttribute ( 'href' ) ) ,
7676 )
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 ) ,
7982 )
8083 const hashString = ( v : string ) =>
8184 createHash ( 'sha256' ) . update ( v ) . digest ( ) . toString ( 'hex' ) . slice ( 0 , 12 )
You can’t perform that action at this time.
0 commit comments