From 9101921ffadcf1117b0a9b823be64584e2b161d5 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Thu, 3 Aug 2023 17:15:38 +0200 Subject: [PATCH] chore: test --- packages/vitest/src/runtime/vm/vite-executor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vitest/src/runtime/vm/vite-executor.ts b/packages/vitest/src/runtime/vm/vite-executor.ts index 084fcee6c10a..18d008f035f8 100644 --- a/packages/vitest/src/runtime/vm/vite-executor.ts +++ b/packages/vitest/src/runtime/vm/vite-executor.ts @@ -1,4 +1,5 @@ import type vm from 'node:vm' +import { pathToFileURL } from 'node:url' import { normalize } from 'pathe' import { CSS_LANGS_RE, KNOWN_ASSET_RE } from 'vite-node/constants' import { toArray } from 'vite-node/utils' @@ -15,7 +16,7 @@ interface ViteExecutorOptions { } const CLIENT_ID = '/@vite/client' -const CLIENT_FILE = `file://${CLIENT_ID}` +const CLIENT_FILE = pathToFileURL(CLIENT_ID).href export class ViteExecutor { private esm: EsmExecutor