Skip to content

Commit 4f60046

Browse files
authored
docs: changes ssr using module runner (#18758)
1 parent 90c66c9 commit 4f60046

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/changes/ssr-using-modulerunner.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
Give us feedback at [Environment API feedback discussion](https://github.com/vitejs/vite/discussions/16358)
55
:::
66

7-
`server.ssrLoadModule` has been replaced by [Module Runner](/guide/api-environment#modulerunner).
7+
`server.ssrLoadModule` has been replaced by importing from a [Module Runner](/guide/api-environment#modulerunner).
88

99
Affect scope: `Vite Plugin Authors`
1010

1111
::: warning Future Deprecation
12-
`ModuleRunner` was first introduce in `v6.0`. The deprecation of `server.ssrLoadModule` is planned for a future major. To identify your usage, set `future.removeSrLoadModule` to `"warn"` in your vite config.
12+
`ModuleRunner` was first introduce in `v6.0`. The deprecation of `server.ssrLoadModule` is planned for a future major. To identify your usage, set `future.removeSsrLoadModule` to `"warn"` in your vite config.
1313
:::
1414

1515
## Motivation
1616

17-
// TODO:
17+
The `server.ssrLoadModule(url)` only allows importing modules in the `ssr` environment and can only execute the modules in the same process as the Vite dev server. For apps with custom environments, each is associated with a `ModuleRunner` that may be running in a separate thread or process. To import modules, we now have `moduleRunner.import(url)`.
1818

1919
## Migration Guide
2020

21-
// TODO:
21+
Check out the [Environment API for Frameworks Guide](../guide/api-environment-frameworks.md).

0 commit comments

Comments
 (0)