From a7e91dd4600396b1af7a9e23e92cb4c9492eb809 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 24 Dec 2024 16:03:41 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20replace=20runner-side=20path=20normaliza?= =?UTF-8?q?tion=20with=20`fetchModule`-side=20r=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit resolve #1791 https://github.com/vitejs/vite/commit/9f10261e7609098b832fd0fb23a64840b3a0d1a0 の反映です。 --- guide/api-environment-runtimes.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/guide/api-environment-runtimes.md b/guide/api-environment-runtimes.md index 86391176..5ab11fff 100644 --- a/guide/api-environment-runtimes.md +++ b/guide/api-environment-runtimes.md @@ -150,11 +150,10 @@ export class ModuleRunner { ```js import { ModuleRunner, ESModulesEvaluator } from 'vite/module-runner' -import { root, transport } from './rpc-implementation.js' +import { transport } from './rpc-implementation.js' const moduleRunner = new ModuleRunner( { - root, transport, }, new ESModulesEvaluator(), @@ -180,10 +179,6 @@ type ModuleRunnerTransport = unknown // ---cut--- interface ModuleRunnerOptions { - /** - * プロジェクトのルート - */ - root: string /** * サーバーと通信するための一連のメソッド。 */ @@ -294,7 +289,6 @@ const transport = { const runner = new ModuleRunner( { - root: fileURLToPath(new URL('./', import.meta.url)), transport, }, new ESModulesEvaluator(), @@ -362,7 +356,6 @@ import { ESModulesEvaluator, ModuleRunner } from 'vite/module-runner' export const runner = new ModuleRunner( { - root: fileURLToPath(new URL('./', import.meta.url)), transport: { async invoke(data) { const response = await fetch(`http://my-vite-server/invoke`, {