Skip to content

Commit e9ee8f4

Browse files
merge vite@9f10261
1 parent 6b0e665 commit e9ee8f4

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

docs/guide/api-environment-runtimes.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,10 @@ Module runner exposes `import` method. When Vite server triggers `full-reload` H
150150

151151
```js
152152
import { ModuleRunner, ESModulesEvaluator } from 'vite/module-runner'
153-
import { root, transport } from './rpc-implementation.js'
153+
import { transport } from './rpc-implementation.js'
154154

155155
const moduleRunner = new ModuleRunner(
156156
{
157-
root,
158157
transport,
159158
},
160159
new ESModulesEvaluator(),
@@ -180,10 +179,6 @@ type ModuleRunnerTransport = unknown
180179

181180
// ---cut---
182181
interface ModuleRunnerOptions {
183-
/**
184-
* Root of the project
185-
*/
186-
root: string
187182
/**
188183
* A set of methods to communicate with the server.
189184
*/
@@ -294,7 +289,6 @@ const transport = {
294289

295290
const runner = new ModuleRunner(
296291
{
297-
root: fileURLToPath(new URL('./', import.meta.url)),
298292
transport,
299293
},
300294
new ESModulesEvaluator(),
@@ -362,7 +356,6 @@ import { ESModulesEvaluator, ModuleRunner } from 'vite/module-runner'
362356

363357
export const runner = new ModuleRunner(
364358
{
365-
root: fileURLToPath(new URL('./', import.meta.url)),
366359
transport: {
367360
async invoke(data) {
368361
const response = await fetch(`http://my-vite-server/invoke`, {

0 commit comments

Comments
 (0)