@cloudflare/vitest-pool-workers 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12868,12 +12868,14 @@ var CloudflarePoolWorker = class {
12868
12868
  r: { externalize: specifier }
12869
12869
  }));
12870
12870
  const maybeRule = compiledRules.find((rule) => testRegExps(rule.include, specifier));
12871
- if (maybeRule !== void 0 && !specifier.includes("?")) {
12872
- const externalize = path.join(this.options.project.config.root, specifier) + `?mf_vitest_force=${maybeRule.type}`;
12871
+ const isWasmModuleSpecifier = maybeRule?.type === "CompiledWasm" && specifier.endsWith(".wasm?module");
12872
+ if (maybeRule !== void 0 && (!specifier.includes("?") || isWasmModuleSpecifier)) {
12873
+ let externalize = specifier.startsWith("/@fs/") ? specifier.substring(4) : path.join(this.options.project.config.root, specifier);
12874
+ if (isWasmModuleSpecifier) externalize = externalize.slice(0, -7);
12873
12875
  return this.socket.send(structuredSerializableStringify({
12874
12876
  t: "s",
12875
12877
  i: d.i,
12876
- r: { externalize }
12878
+ r: { externalize: `${externalize}?mf_vitest_force=${maybeRule.type}` }
12877
12879
  }));
12878
12880
  }
12879
12881
  }