You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vite 2.0 提供 [实验性的 SSR 支持](/guide/ssr)。Vite 提供一个灵活的 API 来在 Node.js 中高效率地直接加载 ESM 源码(并且同样有精准的更新而不需要打包)。提供 CommonJS 版本的依赖会在 SSR 时自动被跳过转换直接加载。生产环境下,服务器可以和 Vite 完全解耦。基于 Vite SSR 的架构也可以很方便的做静态预渲染(SSG)。
49
+
Vite 2.0 提供 [实验性的 SSR 支持](/guide/ssr)。Vite 提供了灵活的 API,以便于在开发过程中直接通过 Node.js 高效率地加载和更新 ESM 的源码(几乎与服务端的 HMR 一致),并自动外部化与 CommonJS 兼容的依赖关系,以提高开发和 SSR 的构建速度。生产环境下,服务器可以和 Vite 完全解耦。基于 Vite SSR 的架构也可以很方便的做静态预渲染(SSG)。
当需要再 Windows Subsystem for Linux (WSL) 2 上运行 Vite 时,如果项目文件夹位于 Windows 文件系统中,你需要将此选项设置为 `{ usePolling: true }`。这是由于 Windows 文件系统的 [WSL2 限制](https://github.com/microsoft/WSL/issues/4739) 造成的。
0 commit comments