File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
packages/vitest-pool-workers/src/pool Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,20 @@ async function viteResolve(
324324 return id ;
325325 }
326326 // strip off deps optimization hash from vite
327- return resolved . id . split ( "v=" ) [ 0 ] ;
327+ // @see https://github.com/cloudflare/workers-sdk/pull/5673
328+ if ( resolved . id . includes ( "?v=" ) ) {
329+ const [ id , hash ] = resolved . id . split ( "?v=" ) ;
330+ debuglog (
331+ "Trimming deps optimization hash from vite, id =" ,
332+ id ,
333+ "v =" ,
334+ hash
335+ ) ;
336+
337+ return id ;
338+ }
339+
340+ return resolved . id ;
328341}
329342
330343type ResolveMethod = "import" | "require" ;
@@ -477,6 +490,9 @@ async function load(
477490 filePath = trimSuffix ( disableCjsEsmShimSuffix , filePath ) ;
478491 }
479492
493+ // debuglog("Trimming ");
494+ // filePath = filePath.split("?v=")[0];
495+
480496 let isEsm =
481497 filePath . endsWith ( ".mjs" ) ||
482498 ( filePath . endsWith ( ".js" ) && isWithinTypeModuleContext ( filePath ) ) ;
You can’t perform that action at this time.
0 commit comments